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

Uninitialized Read in WavpackSetConfiguration64() #67

rohanpadhye opened this issue Mar 4, 2019 · 1 comment

Uninitialized Read in WavpackSetConfiguration64() #67

rohanpadhye opened this issue Mar 4, 2019 · 1 comment


Copy link

@rohanpadhye rohanpadhye commented Mar 4, 2019 - contains fuzzed input

The parsing of the attached file uninit-config.wav leads to a read of an uninitialized location in memory. The uninitialized read can be uncovered using a tool such as Valgrind or MemorySanitizer. For example:

$ valgrind ./cli/wavpack uninit-config.wav
==21125== Memcheck, a memory error detector
==21125== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==21125== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==21125== Command: ./cli/wavpack uninit-config.wav

 WAVPACK  Hybrid Lossless Audio Compressor  Linux Version 5.1.0
 Copyright (c) 1998 - 2019 David Bryant.  All Rights Reserved.

creating uninit-config.wv,==21125== Conditional jump or move depends on uninitialised value(s)
==21125==    at 0x425EEE: WavpackSetConfiguration64 (pack_utils.c:198)
==21125==    by 0x4137E8: ParseDsdiffHeaderConfig (dsdiff.c:318)
==21125==    by 0x408A94: pack_file (wavpack.c:1777)
==21125==    by 0x404AE2: main (wavpack.c:1273)

It appears that this is an uninitialized read of the field config->sample_rate on this line.

Copy link

@rohanpadhye rohanpadhye commented Mar 6, 2019

This is fixed now, thanks!

@rohanpadhye rohanpadhye closed this Mar 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant