binutils: fix CVE-2025-5244

This commit is contained in:
Tyler Langlois
2025-10-06 13:44:11 -06:00
parent c4de6e0737
commit 25e606dd64
2 changed files with 17 additions and 0 deletions
@@ -0,0 +1,13 @@
Backported patch originally targeted against 2.45.
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -14356,5 +14356,6 @@ elf_gc_sweep (bfd *abfd, struct bfd_link_info *info)
if (o->flags & SEC_GROUP)
{
asection *first = elf_next_in_group (o);
- o->gc_mark = first->gc_mark;
+ if (first != NULL)
+ o->gc_mark = first->gc_mark;
}
if (o->gc_mark)
@@ -118,6 +118,10 @@ stdenv.mkDerivation (finalAttrs: {
./avr-size.patch
./windres-locate-gcc.patch
# Backported against CVE patched in the 2.45 series. See:
# https://nvd.nist.gov/vuln/detail/CVE-2025-5244
./CVE-2025-5244.diff
];
outputs = [