bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/24960] New: Memory leak from disassembler


From: p.antoine at catenacyber dot fr
Subject: [Bug binutils/24960] New: Memory leak from disassembler
Date: Tue, 03 Sep 2019 12:55:23 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=24960

            Bug ID: 24960
           Summary: Memory leak from disassembler
           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: ---

Created attachment 11971
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11971&action=edit
Fix

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

There are memory leaks when initializing disassembly from function
`disassembler` for the fields `insn_sets` and sometimes `private_data`
Fixing these leaks will make fuzzing more efficient.

Attached is a proposed fix with a new function `disassemble_release:
For `private_data`, it is used sometimes as an allocated memory which should be
freed, sometimes as a temporary local structure (which should not be freed)
So I added a field `priv_status` to indicate if we should free it

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]