Deepak Rathore
2026-09-01 14:15:36 +05:30
committed by Paul Barker
parent 62881f5cca
commit d8f788d16e
2 changed files with 52 additions and 0 deletions

View File

@@ -82,5 +82,6 @@ SRC_URI = "\
file://CVE-2025-8224.patch \
file://CVE-2026-15003.patch \
file://CVE-2026-18220.patch \
file://CVE-2026-3441_CVE-2026-3442.patch \
"
S = "${WORKDIR}/git"

View File

@@ -0,0 +1,51 @@
From 0f650fc3fc147b05f819ef96af02238cee02c68e Mon Sep 17 00:00:00 2001
From: Alan Modra <amodra@gmail.com>
Date: Sat, 28 Feb 2026 13:16:40 +1030
Subject: [PATCH 1/2] xcofflink buffer overflows
This fixes two fuzzed object file out-of-bounds accesses.
* xcofflink.c (xcoff_link_add_symbols): Properly bounds check
XTY_LD x_scnlen index. Sanity check r_symndx before using it
to index sym hashes.
CVE: CVE-2026-3441 CVE-2026-3442
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=c2bf7de1eb77a91d7a3c86d56408bf57de540faf]
(cherry picked from commit c2bf7de1eb77a91d7a3c86d56408bf57de540faf)
Signed-off-by: Deepak Rathore <deeratho@cisco.com>
---
bfd/xcofflink.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c
index a48cc94fed0..dbfa17c6d58 100644
--- a/bfd/xcofflink.c
+++ b/bfd/xcofflink.c
@@ -1888,12 +1888,9 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
follow its appropriate XTY_SD symbol. The .set pseudo op can
cause the XTY_LD to not follow the XTY_SD symbol. */
{
- bool bad;
-
- bad = false;
- if (aux.x_csect.x_scnlen.u64
- >= (size_t) (esym - (bfd_byte *) obj_coff_external_syms (abfd)))
- bad = true;
+ bool bad = (aux.x_csect.x_scnlen.u64
+ >= ((esym - (bfd_byte *) obj_coff_external_syms (abfd))
+ / symesz));
if (! bad)
{
section = xcoff_data (abfd)->csects[aux.x_csect.x_scnlen.u64];
@@ -2259,6 +2256,7 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
functions imported from dynamic objects. */
if (info->output_bfd->xvec == abfd->xvec
&& *rel_csect != bfd_und_section_ptr
+ && (unsigned long) rel->r_symndx < obj_raw_syment_count (abfd)
&& obj_xcoff_sym_hashes (abfd)[rel->r_symndx] != NULL)
{
struct xcoff_link_hash_entry *h;
--
2.44.4