[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/23781] New: Strip-new has memory leaks in the bfd_malloc f
From: |
hanfangzhang9 at gmail dot com |
Subject: |
[Bug binutils/23781] New: Strip-new has memory leaks in the bfd_malloc function in bfd/libbfd.c. |
Date: |
Mon, 15 Oct 2018 22:01:34 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=23781
Bug ID: 23781
Summary: Strip-new has memory leaks in the bfd_malloc function
in bfd/libbfd.c.
Product: binutils
Version: 2.31
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: hanfangzhang9 at gmail dot com
Target Milestone: ---
Created attachment 11330
--> https://sourceware.org/bugzilla/attachment.cgi?id=11330&action=edit
The poc file of this bug
Dear all,
Description
Strip-new has memory leaks in the bfd_malloc function in bfd/libbfd.c.
To reproduce:
Download the attched file poc
strip-new poc
ASAN Report:
=================================================================
==7092==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 4215 byte(s) in 1 object(s) allocated from:
#0 0x7f5bd4169602 in malloc
(/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
#1 0x46b420 in bfd_malloc
/home/zhang123/Desktop/binutils-2.31.1/bfd/libbfd.c:271
#2 0x465112 in bfd_get_full_section_contents
/home/zhang123/Desktop/binutils-2.31.1/bfd/compress.c:248
#3 0x474839 in bfd_malloc_and_get_section
/home/zhang123/Desktop/binutils-2.31.1/bfd/section.c:1619
#4 0x5e87df in _bfd_pe_bfd_copy_private_bfd_data_common
/home/zhang123/Desktop/binutils-2.31.1/bfd/peigen.c:2979
#5 0x5c3c24 in pe_bfd_copy_private_bfd_data
/home/zhang123/Desktop/binutils-2.31.1/bfd/peicode.h:361
#6 0x40e387 in copy_object
/home/zhang123/Desktop/binutils-2.31.1/binutils/objcopy.c:3170
#7 0x40ff5b in copy_file
/home/zhang123/Desktop/binutils-2.31.1/binutils/objcopy.c:3532
#8 0x413df4 in strip_main
/home/zhang123/Desktop/binutils-2.31.1/binutils/objcopy.c:4476
#9 0x418227 in main
/home/zhang123/Desktop/binutils-2.31.1/binutils/objcopy.c:5586
#10 0x7f5bd3b2382f in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
SUMMARY: AddressSanitizer: 4215 byte(s) leaked in 1 allocation(s).
Found with InsFuzz fuzzer, a modified version of the AFL.
Credits: Hanfang Zhang, Sichuan University
Best regards,
Hanfang Zhang
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/23781] New: Strip-new has memory leaks in the bfd_malloc function in bfd/libbfd.c.,
hanfangzhang9 at gmail dot com <=