Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yasm memory leak #210

Open
randomssr opened this issue Mar 1, 2023 · 1 comment
Open

yasm memory leak #210

randomssr opened this issue Mar 1, 2023 · 1 comment

Comments

@randomssr
Copy link

I found a memory leak bug in yasm.
Please confirm.
Thanks!

Test Environment

Ubuntu 20.04, 64 bit yasm (version: v1.3.0 ;master)

How to trigger

Compile the program with AddressSanitizer
Run command
$ touch u
$ ./yasm -ium u

Details

ASAN report
$./yasm -ium u

yasm: file name already has no extension: output will be in `yasm.out'

=================================================================
==973537==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x499c1d in __interceptor_malloc (/home/root/randomFuzz/yasm/yasm/yasm_a_l_e/yasm+0x499c1d)
    #1 0x53d0af in def_xmalloc /home/root/FuzzDateset/yasm/yasm-1.3.0/libyasm/xmalloc.c:69:14
    #2 0x511025 in yasm_intnum_copy /home/root/FuzzDateset/yasm/yasm-1.3.0/libyasm/intnum.c:397:22
    #3 0x638eb4 in group_assign_vstart_recurse /home/root/FuzzDateset/yasm/yasm-1.3.0/modules/objfmts/bin/bin-objfmt.c:424:30
    #4 0x632759 in bin_objfmt_output /home/root/FuzzDateset/yasm/yasm-1.3.0/modules/objfmts/bin/bin-objfmt.c:1334:9
    #5 0x4d07a2 in do_assemble /home/root/FuzzDateset/yasm/yasm-1.3.0/frontends/yasm/yasm.c:546:5
    #6 0x4ccce0 in main /home/root/FuzzDateset/yasm/yasm-1.3.0/frontends/yasm/yasm.c:749:12
    #7 0x7f1562a88082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x499c1d in __interceptor_malloc (/home/root/randomFuzz/yasm/yasm/yasm_a_l_e/yasm+0x499c1d)
    #1 0x53d0af in def_xmalloc /home/root/FuzzDateset/yasm/yasm-1.3.0/libyasm/xmalloc.c:69:14
    #2 0x510522 in yasm_intnum_create_uint /home/root/FuzzDateset/yasm/yasm-1.3.0/libyasm/intnum.c:310:25
    #3 0x636694 in bin_lma_create_group /home/root/FuzzDateset/yasm/yasm-1.3.0/modules/objfmts/bin/bin-objfmt.c:248:22
    #4 0x51d0f2 in yasm_object_sections_traverse /home/root/FuzzDateset/yasm/yasm-1.3.0/libyasm/section.c:544:22
    #5 0x62fb9e in bin_objfmt_output /home/root/FuzzDateset/yasm/yasm-1.3.0/modules/objfmts/bin/bin-objfmt.c:1147:9
    #6 0x4d07a2 in do_assemble /home/root/FuzzDateset/yasm/yasm-1.3.0/frontends/yasm/yasm.c:546:5
    #7 0x4ccce0 in main /home/root/FuzzDateset/yasm/yasm-1.3.0/frontends/yasm/yasm.c:749:12
    #8 0x7f1562a88082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16

SUMMARY: AddressSanitizer: 32 byte(s) leaked in 2 allocation(s).
@abergmann
Copy link

CVE-2023-31975 was assigned to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants