[Bug ld/24689] Heap-buffer-overflow in _bfd_doprnt in bfd.c in bfd

2019-06-19 Thread 15664243668 at 163 dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24689

--- Comment #2 from 15664243668 at 163 dot com ---
Hello, I compiler binutils 2.32 to the 32-bit LSB version with afl-gcc in the
asan model. The binutils runs in the x86-64 Ubuntu 16.04 services.

> 在 2019年6月19日,下午12:15,amodra at gmail dot com 
>  写道:
> 
> https://sourceware.org/bugzilla/show_bug.cgi?id=24689
> 
> Alan Modra  changed:
> 
>   What|Removed |Added
> 
> CC||amodra at gmail dot com
> 
> --- Comment #1 from Alan Modra  ---
> I don't see this with my standard -fsanitize=address binutils.  How did you
> configure and compiler binutils?
> 
> -- 
> You are receiving this mail because:
> You reported the bug.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/24703] New: objcopy fails --prefix-symbols with no error

2019-06-19 Thread raulftang at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24703

Bug ID: 24703
   Summary: objcopy fails --prefix-symbols with no error
   Product: binutils
   Version: 2.31
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: raulftang at gmail dot com
  Target Milestone: ---

Created attachment 11846
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11846&action=edit
obj files

Hi there,

   I've installed binutils 2.31 via homebrew on Mac os Mojave 10.14.2.

   I've checked the .o file by: `lipo -info a_enum.o`,
and it print out: 
`Non-fat file: a_enum.o is architecture: armv7`. 

then I tried to change symbol prefix name by:
`gobjcopy --prefix-symbols rong a_enum.o`
and it print out:
`gobjcopy: a_enum.o: no error`

But symbol table for a_enum.o don't change.

and when I typed in console:
`objdump -t a_enum.o`
it print out:
`a_enum.o: file format Mach-O arm`

SYMBOL TABLE:
00b4 g F __TEXT,__text  _ASN1_ENUMERATED_get
 g F __TEXT,__text  _ASN1_ENUMERATED_set
01c4 g F __TEXT,__text  _ASN1_ENUMERATED_to_BN
0124 g F __TEXT,__text  _BN_to_ASN1_ENUMERATED
 *UND*  _ASN1_STRING_free
 *UND*  _ASN1_STRING_type_new
 *UND*  _BN_bin2bn
 *UND*  _BN_bn2bin
 *UND*  _BN_is_negative
 *UND*  _BN_num_bits
 *UND*  _BN_set_negative
 *UND*  _ERR_put_error
 *UND*  _OPENSSL_free
 *UND*  _OPENSSL_malloc
 *UND*  _OPENSSL_realloc
 *UND*  ___stack_chk_fail
 *UND*  ___stack_chk_guard

BTW, I used clang to produce the a_enum.o file and it worked for some .o file,
but didn't for others like a_enum.o.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/24703] objcopy fails --prefix-symbols with no error

2019-06-19 Thread raulftang at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24703

--- Comment #1 from raulf  ---
Created attachment 11847
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11847&action=edit
This obj file works well.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/24704] New: [2.33 Regression] Internal error building skiboot for powerpc64-linux-gnu

2019-06-19 Thread doko at debian dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=24704

Bug ID: 24704
   Summary: [2.33 Regression] Internal error building skiboot for
powerpc64-linux-gnu
   Product: binutils
   Version: 2.33 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: doko at debian dot org
  Target Milestone: ---

This was seen building skiboot 6.2 for powerpc64-linux-gnu using binutils trunk
20190614.

(gdb) run
Starting program: /usr/bin/powerpc64-linux-gnu-ld -EB -m elf64ppc
--no-multi-toc -N --build-id=none --whole-archive -static -nostdlib -pie
-Ttext-segment=0x0 --oformat=elf64-powerpc -o skiboot.tmp.elf -T skiboot.lds
skiboot.tmp.a asm/dummy_map.o

Breakpoint 1, _bfd_error_handler (fmt=0x77f6b480 "BFD %s internal error,
aborting at %s:%d in %s\n")
at ../../bfd/bfd.c:1174
1174../../bfd/bfd.c: No such file or directory.
(gdb) bt
#0  _bfd_error_handler (fmt=0x77f6b480 "BFD %s internal error, aborting at
%s:%d in %s\n")
at ../../bfd/bfd.c:1174
#1  0x77ebc6c4 in _bfd_abort (file=file@entry=0x77f7e071
"../../bfd/elf64-ppc.c", 
line=line@entry=15381, 
fn=fn@entry=0x77f81480 <__PRETTY_FUNCTION__.18116>
"ppc64_elf_relocate_section")
at ../../bfd/bfd.c:1440
#2  0x77ee1e70 in ppc64_elf_relocate_section
(output_bfd=output_bfd@entry=0x5570b4c0, 
info=, input_bfd=input_bfd@entry=0x55740d00, 
input_section=input_section@entry=0x55742270, contents=, 
relocs=relocs@entry=0x55744ca8, local_syms=,
local_sections=)
at ../../bfd/elf64-ppc.c:15381
#3  0x77f133e1 in elf_link_input_bfd
(flinfo=flinfo@entry=0x7fffe0e0, 
input_bfd=input_bfd@entry=0x55740d00) at ../../bfd/elflink.c:10887
#4  0x77f14eef in bfd_elf_final_link (abfd=,
info=)
at ../../bfd/elflink.c:12215
#5  0x55578e0f in ldwrite () at ../../ld/ldwrite.c:581
#6  0x55561514 in main (argc=, argv=) at
../../ld/ldmain.c:457

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/24704] [2.33 Regression] Internal error building skiboot for powerpc64-linux-gnu

2019-06-19 Thread doko at debian dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=24704

Matthias Klose  changed:

   What|Removed |Added

 CC||amodra at gmail dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/24704] [2.33 Regression] Internal error building skiboot for powerpc64-linux-gnu

2019-06-19 Thread doko at debian dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=24704

--- Comment #1 from Matthias Klose  ---
Created attachment 11848
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11848&action=edit
test case

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/24704] [2.33 Regression] Internal error building skiboot for powerpc64-linux-gnu

2019-06-19 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24704

Alan Modra  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC|amodra at gmail dot com|
   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/24704] [2.33 Regression] Internal error building skiboot for powerpc64-linux-gnu

2019-06-19 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24704

--- Comment #2 from Alan Modra  ---
This is due to a horrible linker script breaking a new GOT indirect to GOT
relative optimisation (git commit 066f4018ae78).

ld does a preliminary layout to see whether various optimisations can be done. 
In this case the preliminary layout indicates that code using a GOT indirect
address can be replaced with code calculating a GOT relative address (saving a
GOT entry and load from memory).  The trouble is that skiboot.lds puts a bunch
of dynamic sections between .got and the address in question.  Those dynamic
sections are not filled out for the preliminary layout, nor can they be since
one of the aims of the ppc64 linker optimisation is to reduce dynamic
relocations.  With the dynamic sections adding over 150kb, the optimisation is
no longer valid but ld has already removed the GOT entry.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/24700] objdump fails to reject invalid vbroadcasti32x8/vbroadcasti64x4 encodings.

2019-06-19 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=24700

--- Comment #1 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by H.J. Lu :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f0a6222e30215d4b8ecb8124fe5ad4c3f321f8c4

commit f0a6222e30215d4b8ecb8124fe5ad4c3f321f8c4
Author: H.J. Lu 
Date:   Wed Jun 19 10:01:27 2019 -0700

i386: Check vector length for EVEX broadcast instructions

Since not all vector lengths are supported by EVEX broadcast instructions,
decode them only with supported vector lengths.

gas/

PR binutils/24700
* testsuite/gas/i386/disassem.s: Add test for vbroadcasti32x8
with invalid vector length.
* testsuite/gas/i386/x86-64-disassem.s: Likewise.
* testsuite/gas/i386/disassem.d: Updated.
* testsuite/gas/i386/x86-64-disassem.d: Likewise.

opcodes/

PR binutils/24700
* i386-dis-evex.h (evex_table): Update EVEX_W_0F3819_P_2,
EVEX_W_0F381A_P_2, EVEX_W_0F381B_P_2, EVEX_W_0F385A_P_2 and
EVEX_W_0F385B_P_2.
(evex_len_table): Add EVEX_LEN_0F3819_P_2_W_0,
EVEX_LEN_0F3819_P_2_W_1, EVEX_LEN_0F381A_P_2_W_0,
EVEX_LEN_0F381A_P_2_W_1, EVEX_LEN_0F381B_P_2_W_0,
EVEX_LEN_0F381B_P_2_W_1, EVEX_LEN_0F385A_P_2_W_0,
EVEX_LEN_0F385A_P_2_W_1, EVEX_LEN_0F385B_P_2_W_0 and
EVEX_LEN_0F385B_P_2_W_1.
* i386-dis.c (EVEX_LEN_0F3819_P_2_W_0): New enum.
(EVEX_LEN_0F3819_P_2_W_1): Likewise.
(EVEX_LEN_0F381A_P_2_W_0): Likewise.
(EVEX_LEN_0F381A_P_2_W_1): Likewise.
(EVEX_LEN_0F381B_P_2_W_0): Likewise.
(EVEX_LEN_0F381B_P_2_W_1): Likewise.
(EVEX_LEN_0F385A_P_2_W_0): Likewise.
(EVEX_LEN_0F385A_P_2_W_1): Likewise.
(EVEX_LEN_0F385B_P_2_W_0): Likewise.
(EVEX_LEN_0F385B_P_2_W_1): Likewise.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/24705] New: OOM in objdump when provided with fuzzed linux x86-64 elf samples

2019-06-19 Thread eunsoo.sheen at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24705

Bug ID: 24705
   Summary: OOM in objdump when provided with fuzzed linux x86-64
elf samples
   Product: binutils
   Version: 2.32
Status: UNCONFIRMED
  Severity: minor
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: eunsoo.sheen at gmail dot com
  Target Milestone: ---

Created attachment 11849
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11849&action=edit
input files which raise OOM error in objdump

I tested objdump in binutils-2.32 with some fuzzed samples.

These samples have objdump raise out of memory error.

Error message is as follows:

~$ objdump -x ./crashes/id\:00\,sig\:06\,src\:08\,op\:havoc\,rep\:8

./new-test/crashes/id:00,sig:06,src:08,op:havoc,rep:8: file format
elf64-x86-64
./new-test/crashes/id:00,sig:06,src:08,op:havoc,rep:8
architecture: i386:x86-64, flags 0x0011:
HAS_RELOC, HAS_SYMS
start address 0x

objdump: out of memory allocating 355045037616 bytes after a total of 0 bytes

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/24700] objdump fails to reject invalid vbroadcasti32x8/vbroadcasti64x4 encodings.

2019-06-19 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24700

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |2.33

--- Comment #2 from H.J. Lu  ---
Fixed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/24706] New: crashes in objdump when provided with fuzzed linux x86-64 elf samples

2019-06-19 Thread limhaksu at naver dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24706

Bug ID: 24706
   Summary: crashes in objdump when provided with fuzzed linux
x86-64 elf samples
   Product: binutils
   Version: 2.32
Status: UNCONFIRMED
  Severity: minor
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: limhaksu at naver dot com
  Target Milestone: ---

Created attachment 11850
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11850&action=edit
fuzzed samples

I tested objdump in binutils-2.32 with AddressSanitizer and some fuzzed samples
and found some LargeMmapAllocator errors.

ERROR: AddressSanitizer failed to allocate 0x558000 (366503886848) bytes of
LargeMmapAllocator (error code: 12)

The samples are attached.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/24707] New: binutils crash invoke files, by using afl fuzzing

2019-06-19 Thread hywook4 at naver dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24707

Bug ID: 24707
   Summary: binutils crash invoke files, by using afl fuzzing
   Product: binutils
   Version: 2.32
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: hywook4 at naver dot com
  Target Milestone: ---

Created attachment 11851
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11851&action=edit
Crash invoke files by afl-fuzz

Crashes found by fuzzing, using afl-fuzz.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils