Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kavyasree committed Nov 19, 2024
1 parent ecd289e commit 4a066d8
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 8 deletions.
29 changes: 29 additions & 0 deletions SPECS/tar/CVE-2022-48303.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From aaba852a19b5ed717a48e62baa277966cdbdcb05 Mon Sep 17 00:00:00 2001
From: kavyasree <[email protected]>
Date: Tue, 19 Nov 2024 10:23:25 +0530
Subject: [PATCH] Fix CVE-2022-48303

---
src/list.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/src/list.c b/src/list.c
index d7ef441..20ae4ee 100644
--- a/src/list.c
+++ b/src/list.c
@@ -888,6 +888,12 @@ from_header (char const *where0, size_t digs, char const *type,
<< (CHAR_BIT * sizeof (uintmax_t)
- LG_256 - (LG_256 - 2)));
value = (*where++ & ((1 << (LG_256 - 2)) - 1)) - signbit;
+ if (where == lim)
+ {
+ if (type && !silent)
+ ERROR ((0, 0, _("Archive base-256 value is invalid")));
+ return -1;
+ }
for (;;)
{
value = (value << LG_256) + (unsigned char) *where++;
--
2.34.1

8 changes: 6 additions & 2 deletions SPECS/tar/tar.spec
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
Summary: Archiving program
Name: tar
Version: 1.34
Release: 2%{?dist}
Release: 3%{?dist}
License: GPLv3+
URL: https://www.gnu.org/software/tar
Group: Applications/System
Vendor: Microsoft Corporation
Distribution: Mariner
Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
Patch0: CVE-2022-48303.patch

%description
Contains GNU archiving program

%prep
%setup -q
%autosetup -p1
%build
FORCE_UNSAFE_CONFIGURE=1 ./configure \
--prefix=%{_prefix} \
Expand Down Expand Up @@ -43,6 +44,9 @@ make %{?_smp_mflags} check
%{_mandir}/*/*

%changelog
* Tue Nov 19 2024 Kavya Sree Kaitepalli <[email protected]> - 1.34-3
- Fix CVE-2022-48303 by patching

* Wed Sep 20 2023 Jon Slobodzian <[email protected]> - 1.34-2
- Recompile with stack-protection fixed gcc version (CVE-2023-4039)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ libcap-ng-devel-0.8.2-2.cm2.aarch64.rpm
util-linux-2.37.4-9.cm2.aarch64.rpm
util-linux-devel-2.37.4-9.cm2.aarch64.rpm
util-linux-libs-2.37.4-9.cm2.aarch64.rpm
tar-1.34-2.cm2.aarch64.rpm
tar-1.34-3.cm2.aarch64.rpm
xz-5.2.5-1.cm2.aarch64.rpm
xz-devel-5.2.5-1.cm2.aarch64.rpm
xz-lang-5.2.5-1.cm2.aarch64.rpm
Expand Down
2 changes: 1 addition & 1 deletion toolkit/resources/manifests/package/pkggen_core_x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ libcap-ng-devel-0.8.2-2.cm2.x86_64.rpm
util-linux-2.37.4-9.cm2.x86_64.rpm
util-linux-devel-2.37.4-9.cm2.x86_64.rpm
util-linux-libs-2.37.4-9.cm2.x86_64.rpm
tar-1.34-2.cm2.x86_64.rpm
tar-1.34-3.cm2.x86_64.rpm
xz-5.2.5-1.cm2.x86_64.rpm
xz-devel-5.2.5-1.cm2.x86_64.rpm
xz-lang-5.2.5-1.cm2.x86_64.rpm
Expand Down
4 changes: 2 additions & 2 deletions toolkit/resources/manifests/package/toolchain_aarch64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -558,8 +558,8 @@ systemd-bootstrap-250.3-12.cm2.aarch64.rpm
systemd-bootstrap-debuginfo-250.3-12.cm2.aarch64.rpm
systemd-bootstrap-devel-250.3-12.cm2.aarch64.rpm
systemd-bootstrap-rpm-macros-250.3-12.cm2.noarch.rpm
tar-1.34-2.cm2.aarch64.rpm
tar-debuginfo-1.34-2.cm2.aarch64.rpm
tar-1.34-3.cm2.aarch64.rpm
tar-debuginfo-1.34-3.cm2.aarch64.rpm
tdnf-3.5.2-4.cm2.aarch64.rpm
tdnf-autoupdate-3.5.2-4.cm2.aarch64.rpm
tdnf-cli-libs-3.5.2-4.cm2.aarch64.rpm
Expand Down
4 changes: 2 additions & 2 deletions toolkit/resources/manifests/package/toolchain_x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,8 @@ systemd-bootstrap-250.3-12.cm2.x86_64.rpm
systemd-bootstrap-debuginfo-250.3-12.cm2.x86_64.rpm
systemd-bootstrap-devel-250.3-12.cm2.x86_64.rpm
systemd-bootstrap-rpm-macros-250.3-12.cm2.noarch.rpm
tar-1.34-2.cm2.x86_64.rpm
tar-debuginfo-1.34-2.cm2.x86_64.rpm
tar-1.34-3.cm2.x86_64.rpm
tar-debuginfo-1.34-3.cm2.x86_64.rpm
tdnf-3.5.2-4.cm2.x86_64.rpm
tdnf-autoupdate-3.5.2-4.cm2.x86_64.rpm
tdnf-cli-libs-3.5.2-4.cm2.x86_64.rpm
Expand Down

0 comments on commit 4a066d8

Please sign in to comment.