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

memory leaks detected #398

Closed
fCorleone opened this issue Jul 5, 2018 · 5 comments
Closed

memory leaks detected #398

fCorleone opened this issue Jul 5, 2018 · 5 comments

Comments

@fCorleone
Copy link

=================================================================
==11731==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 12736 byte(s) in 1 object(s) allocated from:
#0 0x7ffff6f0279a in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9879a)
#1 0x7ffff6b3deb7 in psf_allocate src/common.c:45

Indirect leak of 3672 byte(s) in 1 object(s) allocated from:
#0 0x7ffff6f02961 in realloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98961)
#1 0x7ffff6b4fb24 in psf_bump_header_allocation src/common.c:70
#2 0x7ffff6b4fb24 in header_seek src/common.c:886
#3 0x7ffff6b4fb24 in psf_binheader_readf src/common.c:1121

Indirect leak of 1920 byte(s) in 1 object(s) allocated from:
#0 0x7ffff6f0279a in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9879a)
#1 0x7ffff6bfe0a0 in psf_store_read_chunk src/chunk.c:114
#2 0x7ffff6bfe0a0 in psf_store_read_chunk_u32 src/chunk.c:151
#3 0x7ffff6c35117 (/usr/local/lib/libsndfile.so.1+0x260117)

Indirect leak of 528 byte(s) in 1 object(s) allocated from:
#0 0x7ffff6f0279a in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9879a)
#1 0x7ffff6aaed7f in wav_open src/wav.c:163

Indirect leak of 256 byte(s) in 1 object(s) allocated from:
#0 0x7ffff6f02961 in realloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98961)
#1 0x7ffff6be8116 in psf_store_string src/strings.c:134
The command line is ./sndfile-convert ./2.wav ./out.prc where 2.wav is just a simple wav file.

@erikd
Copy link
Member

erikd commented Jul 6, 2018

What version of libsndfile is this? Is this, or have you tried current git HEAD?

It would also be useful for you to post the sndfile-info output for that file.

@carnil
Copy link

carnil commented Jul 8, 2018

This issue was assigned CVE-2018-13419

@sgayou
Copy link

sgayou commented Jul 9, 2018

Unable to reproduce this on libsndfile-1.0.28 with a clang fsanitize=leak build. Seems like the convert operation will only complete with the input wav has a single channel. The wav file used to trigger the leak would be useful in addition to the lsan log.

./sndfile-convert -endian=little -alaw tone.wav test.prc

No dice in valgrind either. Let me know if anyone else has more success.

@abergmann
Copy link

@fCorleone any chance to publish the reproducer here? Thanks!

@erikd
Copy link
Member

erikd commented Jan 2, 2019

Closing this for now. If a file can be provided that triggers this issue please feel free to re-open.

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

5 participants