Bug 2519350

Summary: CVE-2026-19582 gdb: Stack Buffer Overflow in GNU Binutils in rsrc_print_name from an untrusted PE file [fedora-all]
Product: [Fedora] Fedora Reporter: Todd Cullum <tcullum>
Component: gdbAssignee: Keith Seitz <keiths>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: ahajkova, fweimer, guinevere, jan, keiths, kevinb, mcermak, mkolar, suraj.ghimire7
Target Milestone: ---Keywords: Security, SecurityTracking
Target Release: ---Flags: keiths: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: {"flaws": ["17c875b1-af71-4c43-89c5-4883381665f0"]}
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-08-19 19:37:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2513754    

Description Todd Cullum 2026-08-18 22:55:35 UTC
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.

There's a flaw in binutils 2.46.1 in rsrc_print_name() and rsrc_parse_entries() functions by which an attacker with local access or whom does not have local access but social engineers a victim to run binutils on a crafted PE file, can execute malicious code.

Comment 1 Keith Seitz 2026-08-19 19:37:35 UTC
This is not an issue for several reasons.

Most simply, Fedora (linux distros generally) do not use PE/COFF formats.
Only ELF/DWARF is used. Therefore, it would be an especially naive
developer who would attempt to load such a compromised file into a distro's
gdb.

Moreover, the affected function, rsrc_print_name, is only used from rsrc_resource_name,
which is only used from rsrc_sort_entries while reporting a duplicate .rsrc section.
All of this results only from a call to bfd_final_link:

ld (ldwrite.c)
  -> bfd_final_link
    -> _bfd_coff_final_link
      -> bfd_coff_final_link_postscript
        -> rsrc_process_section
          -> rsrc_parse_entries / rsrc_parse_entry   <- unchecked 16-bit length (LEN)
          -> rsrc_sort_entries
            -> rsrc_resource_name <- fixed 256-byte buffer
              -> rsrc_print_name <- where LEN bytes are written to the fixed-length buffer

GDB never calls bfd_final_link. It is not a linker.

The compile machinery does not use this route, either, and that feature is
no longer supported on Fedora.