Description
SoX through 14.4.2 contains a heap out-of-bounds write vulnerability in lsx_ms_adpcm_block_expand_i() in src/adpcm.c, triggered by an odd samplesPerBlock value in the WAV fmt chunk. Attackers can supply a crafted MS ADPCM WAV file to sox or any libsox consumer to write a partially controlled 16-bit sample past the heap buffer allocated by wav_ms_adpcm_fmt().
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| SoX | sox | ≤ 14.4.2 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 13 | sox | No fix yet | — |
| Debian 12 | sox | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 24.04 LTS | sox | No fix yet | — |
| Ubuntu 22.04 LTS | sox | No fix yet | — |
| Ubuntu 20.04 LTS | sox | No fix yet | — |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 18.04 LTS | sox | No fix yet | — |
| Ubuntu Pro 16.04 LTS | sox | No fix yet | — |
| Ubuntu Pro 14.04 LTS | sox | No fix yet | — |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | sox | No fix yet | — |
References
- https://hackmd.io/@haind-pwn/sox-wav-ms-adpcm-samplesperblock-oob-write technical-description exploit
- https://github.com/chirlu/sox/blob/42b3557e13e0fe01a83465b672d89faddbe65f49/src/adpcm.c#L144-L166 technical-description
- https://github.com/chirlu/sox/blob/42b3557e13e0fe01a83465b672d89faddbe65f49/src/wav.c#L250-L251 technical-description
- https://sourceforge.net/projects/sox/ product
- VulnCheck Advisory: SoX through 14.4.2 Heap Out-of-Bounds Write via MS ADPCM WAV Decoding third-party-advisory