https://sourceware.org/bugzilla/show_bug.cgi?id=23144
Bug ID: 23144
Summary: strip-new/objcopy: SIGSEGV in group_signature
Product: binutils
Version: 2.31 (HEAD)
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: paolo.montesel+sourceware at gmail dot com
Target Milestone: ---
Created attachment 10996
--> https://sourceware.org/bugzilla/attachment.cgi?id=10996&action=edit
crash
As part of a tool I'm writing I fuzzed binutils. The attached file makes
strip-new/objcopy crash inside `group_signature`:
Program received signal SIGSEGV, Segmentation fault.
0x00000000004063f6 in group_signature (group=0x72d950, group=0x72d950) at
objcopy.c:1222
1222 return isympp[ghdr->sh_info - 1];
#0 0x00000000004063f6 in group_signature (group=0x72d950, group=0x72d950) at
objcopy.c:1222
#1 0x000000000040684f in is_strip_section (sec=sec@entry=0x72d950,
abfd=0x72bf40) at objcopy.c:1350
#2 0x000000000040690f in setup_section (ibfd=0x72bf40, isection=0x72d950,
obfdarg=0x72f2e0) at objcopy.c:3677
#3 0x000000000042602c in bfd_map_over_sections (abfd=abfd@entry=0x72bf40,
operation=operation@entry=0x4068f0 <setup_section>,
user_storage=user_storage@entry=0x72f2e0) at section.c:1391
#4 0x00000000004079ea in copy_object (ibfd=0x72bf40, obfd=0x72f2e0,
input_arch=<optimized out>) at objcopy.c:2627
#5 0x000000000040a5aa in copy_file (input_filename=0x7fffffffe136
"id:000012,sig:1"..., output_filename=output_filename@entry=0x7fffffffe164
"/dev/null", input_target=input_target@entry=0x0, output_target=<optimized
out>, output_target@entry=0x0, input_arch=input_arch@entry=0x0) at
objcopy.c:3532
#6 0x0000000000404929 in strip_main (argv=<optimized out>, argc=<optimized
out>) at objcopy.c:4476
#7 main (argc=argc@entry=4, argv=argv@entry=0x7fffffffdd78) at objcopy.c:5586
#8 0x00007ffff7829830 in __libc_start_main (main=0x402e10 <main>, argc=4,
argv=0x7fffffffdd78, init=<optimized out>, fini=<optimized out>,
rtld_fini=<optimized out>, stack_end=0x7fffffffdd68) at ../csu/libc-start.c:291
#9 0x0000000000405539 in _start ()
Compiled and tried against a freshly cloned repo. It also works on Ubuntu
Xenial's binutils (2.26.1).
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils