[Bug 16159] New: Memory Leak at getopt

bugzilla at busybox.net bugzilla at busybox.net
Sun Aug 11 08:15:48 UTC 2024


https://bugs.busybox.net/show_bug.cgi?id=16159

            Bug ID: 16159
           Summary: Memory Leak at getopt
           Product: Busybox
           Version: 1.36.x
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Standard Compliance
          Assignee: unassigned at busybox.net
          Reporter: stasos24 at gmail.com
                CC: busybox-cvs at busybox.net
  Target Milestone: ---

Created attachment 9796
  --> https://bugs.busybox.net/attachment.cgi?id=9796&action=edit
Config.in with sanitizer flags

PoC:
- make defconfig using provided Config.in (added sanitizer flags)
- make
- ln -s ./busybox_unstripped ./getopt
- ./getopt $(cat ./get_crash)

Asan report:
=================================================================
==1372111==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 9 byte(s) in 1 object(s) allocated from:
    #0 0x7f3a8ce0a817 in __interceptor_strdup
../../../../src/libsanitizer/asan/asan_interceptors.cpp:452
    #1 0x55ea0628fddf in xstrdup libbb/xfuncs_printf.c:84
    #2 0x7ffe3bc9d670  ([stack]+0x20670)
    #3 0x28bdbfef272826ff  (<unknown module>)

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

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


More information about the busybox-cvs mailing list