[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/18758] New: several undefined behaviors in objdump and str
From: |
xiedingbao at gmail dot com |
Subject: |
[Bug binutils/18758] New: several undefined behaviors in objdump and strings |
Date: |
Sat, 01 Aug 2015 21:29:39 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=18758
Bug ID: 18758
Summary: several undefined behaviors in objdump and strings
Product: binutils
Version: unspecified
Status: NEW
Severity: minor
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: xiedingbao at gmail dot com
Target Milestone: ---
Created attachment 8473
--> https://sourceware.org/bugzilla/attachment.cgi?id=8473&action=edit
inputs to reproduce the undefined behaviors
Hi, I found several undefined behaviors in binutils,
version: GNU Binutils 2.25.51.20150728 and my OS is ubuntu-14 64bit.
To reproduce them, first build the source code with ubsan and then execute
command: objdump -x $file (in attachment),
you will see the following error information:
../../binutils-git/bfd/elf.c:845:28: runtime error: member access within null
pointer of type 'asection' (aka 'struct bfd_section')
../../binutils-git/bfd/elf.c:845:28: runtime error: load of null pointer of
type 'const char *'
Segmentation fault (core dumped)
execute command: strings -d $file (in attachment),
you will see the following error information:
../../binutils-git/bfd/peicode.h:644:40: runtime error: member access within
misaligned address 0x000002fedda4 for type 'struct coff_section_tdata', which
requires 8 byte alignment
0x000002fedda4: note: pointer points here
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00
^
../../binutils-git/bfd/peicode.h:487:47: runtime error: member access within
misaligned address 0x000002fede5c for type 'struct coff_section_tdata', which
requires 8 byte alignment
0x000002fede5c: note: pointer points here
00 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00
^
../../binutils-git/bfd/peicode.h:501:40: runtime error: member access within
misaligned address 0x000002fedda4 for type 'struct coff_section_tdata', which
requires 8 byte alignment
0x000002fedda4: note: pointer points here
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00
^
../../binutils-git/bfd/peicode.h:502:40: runtime error: member access within
misaligned address 0x000002fedda4 for type 'struct coff_section_tdata', which
requires 8 byte alignment
0x000002fedda4: note: pointer points here
00 00 00 00 40 dc fe 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00
../../binutils-git/bfd/peicode.h:869:7: runtime error: store to misaligned
address 0x000003096d97 for type 'unsigned int', which requires 4 byte alignment
0x000003096d97: note: pointer points here
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00
^
../../binutils-git/bfd/peicode.h:870:7: runtime error: store to misaligned
address 0x000003096df3 for type 'unsigned int', which requires 4 byte alignment
0x000003096df3: note: pointer points here
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00
Can you please take a look?
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/18758] New: several undefined behaviors in objdump and strings,
xiedingbao at gmail dot com <=