[Bug binutils/11983] libbfd reuses pointer passed to bfd_openr

2019-09-02 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=11983

--- Comment #16 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Alan Modra :

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

commit 217d2eaa69c2a5d58cdfd11619c4f2e41c986826
Author: Alan Modra 
Date:   Mon Sep 2 16:48:44 2019 +0930

Re: Memory leak in dwarf2.c

PR 11983
* dwarf2.c (read_alt_indirect_string): Free debug_filename
on success.  Tidy.
(read_alt_indirect_ref): 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/24800] ar fails to create / append archives in aixcoff64-rs6000 target

2019-09-02 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24800

--- Comment #3 from Nick Clifton  ---
(In reply to Andrew Paprocki from comment #2)
Hi Andrew,

> No, I was saying the older version 2.23.2 shows it working correctly, but it
> is broken by the later version 2.31.1, indicating that it broke somewhere
> between 23.2 -> 31.1.

Doh - sorry - stupid number dyslexia.

Anyway, please could you upload a copy of test32.o and test64.o so that I
can run some tests ?  Thanks.

Cheers
  Nick

-- 
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/24958] New: Buffer over read in print_insn_mmix

2019-09-02 Thread p.antoine at catenacyber dot fr
https://sourceware.org/bugzilla/show_bug.cgi?id=24958

Bug ID: 24958
   Summary: Buffer over read in print_insn_mmix
   Product: binutils
   Version: 2.33 (HEAD)
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: p.antoine at catenacyber dot fr
  Target Milestone: ---

Binutils is version from commit 217d2eaa69c2a5d58cdfd11619c4f2e41c986826

I have been fuzzing binutils disassembler, you can find the fuzz target here
https://github.com/google/oss-fuzz/pull/2617

Bug is buffer over read of array `spec_reg_name` of struct mmix_dis_info : `  
const char *spec_reg_name[32];`

In `print_insn_mmix`, we first have 
```
  x = buffer[1];
  y = buffer[2];
  z = buffer[3];

```

Then, with no more control of these values, we use them as index for
`spec_reg_name` 
For instance :
`(*info->fprintf_func) (info->stream, "%s,%d", minfop->spec_reg_name[x], z);`
There are three such lines of code
A patch could be to check `if x >= 32` and error in this case before calling
`(*info->fprintf_func)`

A reproducer can be made with :
disasm_info.arch = 0x49;
disasm_info.mach = 0;
disasm_info.flavour = 0;
disasm_info.buffer = {0xf7, 0x25, 0x00, 0x00};
disasm_info.buffer_length = 4;

-- 
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/24800] ar fails to create / append archives in aixcoff64-rs6000 target

2019-09-02 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24800

Alan Modra  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||amodra at gmail dot com
 Resolution|--- |INVALID

--- Comment #4 from Alan Modra  ---
If you are using one of the xcoff targets (either because you configured
binutils for one of those targets or due to selecting one of the xcoff targets
via the --target command line option) then adding 64-bit objects to an archive
requires -X64 or -X32_64.  binutils ar has behaved like this since 2002, well
before 2.23.2.  Just like your /bin/ar, the default is to process 32-bit object
files but ignore 64-bit objects.

-- 
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