[Top][All Lists]

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

[Bug binutils/25360] New: memory leak in readelf, get_data

From: featherrain26 at gmail dot com
Subject: [Bug binutils/25360] New: memory leak in readelf, get_data
Date: Fri, 10 Jan 2020 13:45:41 +0000


            Bug ID: 25360
           Summary: memory leak in readelf, get_data
           Product: binutils
           Version: 2.32
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: featherrain26 at gmail dot com
  Target Milestone: ---

Created attachment 12181
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12181&action=edit
POC file

Hi, there.

There is a memory leak in file binutils/readelf.c, get_data function.

Here is the reproducing environment and procedure:

Distributor ID: Ubuntu
Description:    Ubuntu 16.04.6 LTS
Release:        16.04
Codename:       xenial
gcc:            5.4.0

CFLAGS="-fsanitize=address,undefined" ./configure

./readelf -agteSdcWw --dyn-syms -D poc

Here is the error message:

==15608==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 69 byte(s) in 1 object(s) allocated from:
    #0 0x7ffff6f02602 in malloc
    #1 0x40b2a1 in get_data
    #2 0x478a80 in process_notes_at
    #3 0x47961f in process_corefile_note_segments
    #4 0x47a0f6 in process_note_sections
    #5 0x47a195 in process_notes
    #6 0x47c930 in process_object
    #7 0x47e950 in process_file
    #8 0x47ecd1 in main
    #9 0x7ffff5db382f in __libc_start_main

SUMMARY: AddressSanitizer: 69 byte(s) leaked in 1 allocation(s).


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]