pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/binutils binutils: add fix for CVE-2022-38533 (h...
details: https://anonhg.NetBSD.org/pkgsrc/rev/ceee45aa5a29
branches: trunk
changeset: 389855:ceee45aa5a29
user: fcambus <fcambus%pkgsrc.org@localhost>
date: Sun Dec 11 16:43:10 2022 +0000
description:
binutils: add fix for CVE-2022-38533 (heap buffer-overflow in strip).
>From upstream commit log:
PR29482 - strip: heap-buffer-overflow
PR 29482
* coffcode.h (coff_set_section_contents): Sanity check _LIB.
diffstat:
devel/binutils/Makefile | 3 ++-
devel/binutils/distinfo | 3 ++-
devel/binutils/patches/patch-bfd_coffcode.h | 24 ++++++++++++++++++++++++
3 files changed, 28 insertions(+), 2 deletions(-)
diffs (55 lines):
diff -r eb30957bad82 -r ceee45aa5a29 devel/binutils/Makefile
--- a/devel/binutils/Makefile Sun Dec 11 15:33:31 2022 +0000
+++ b/devel/binutils/Makefile Sun Dec 11 16:43:10 2022 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.107 2022/08/06 09:49:32 fcambus Exp $
+# $NetBSD: Makefile,v 1.108 2022/12/11 16:43:10 fcambus Exp $
DISTNAME= binutils-2.39
+PKGREVISION= 1
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GNU:=binutils/}
EXTRACT_SUFX= .tar.bz2
diff -r eb30957bad82 -r ceee45aa5a29 devel/binutils/distinfo
--- a/devel/binutils/distinfo Sun Dec 11 15:33:31 2022 +0000
+++ b/devel/binutils/distinfo Sun Dec 11 16:43:10 2022 +0000
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.48 2022/08/06 09:49:32 fcambus Exp $
+$NetBSD: distinfo,v 1.49 2022/12/11 16:43:10 fcambus Exp $
BLAKE2s (binutils-2.39.tar.bz2) = 79c9e003be8c3793764b1a79ac04ce9de89425360f6e7c9573d10fe92c6149b1
SHA512 (binutils-2.39.tar.bz2) = faa592dd48fc715901ad704ac96dbd34b1792c51e77c7a92a387964b0700703c74be07de45cc4751945c8c0674368c73dc17bbc563d1d2cd235b5ebd8c6e7efb
Size (binutils-2.39.tar.bz2) = 36782148 bytes
SHA1 (patch-bfd_cache.c) = e2d96bad350552eacdffa83532f9dc9e15ee9be9
+SHA1 (patch-bfd_coffcode.h) = c8fe60982a21219b724c3851220df27f6a98ed1f
SHA1 (patch-gold_Makefile.in) = e01d973f9625a1653851f796c123efec37102fbd
SHA1 (patch-gold_options.h) = 03816bbf157d781820d96a4d3af0885dc2bbbaa9
SHA1 (patch-gold_system.h) = 9b4130b5315763daa66e0a91a8be6d1df0d10344
diff -r eb30957bad82 -r ceee45aa5a29 devel/binutils/patches/patch-bfd_coffcode.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/binutils/patches/patch-bfd_coffcode.h Sun Dec 11 16:43:10 2022 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-bfd_coffcode.h,v 1.1 2022/12/11 16:43:11 fcambus Exp $
+
+Fix for CVE-2022-38533: heap buffer overflow in strip (Binutils PR29482).
+
+Upstream commit ef186fe54aa6d281a3ff8a9528417e5cc614c797.
+
+--- bfd/coffcode.h.orig 2022-07-08 09:46:47.000000000 +0000
++++ bfd/coffcode.h
+@@ -4284,10 +4284,13 @@ coff_set_section_contents (bfd * abfd,
+
+ rec = (bfd_byte *) location;
+ recend = rec + count;
+- while (rec < recend)
++ while (recend - rec >= 4)
+ {
++ size_t len = bfd_get_32 (abfd, rec);
++ if (len == 0 || len > (size_t) (recend - rec) / 4)
++ break;
++ rec += len * 4;
+ ++section->lma;
+- rec += bfd_get_32 (abfd, rec) * 4;
+ }
+
+ BFD_ASSERT (rec == recend);
Home |
Main Index |
Thread Index |
Old Index