Description
NetSurf libnsbmp through 0.1.7 contains an out-of-bounds read vulnerability in bmp_decode_rle8() and bmp_decode_rle4() because absolute-run bound checks omit the word-alignment pad byte. Attackers can supply a crafted RLE8 or RLE4 BMP ending on an odd-length absolute run to cause a one-byte heap over-read, crashing applications decoding untrusted images.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| NetSurf | libnsbmp | ≤ 0.1.7 | — |
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.
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 16.04 LTS | libnsbmp | No fix yet | — |
References
- https://hackmd.io/@haind-pwn/libnsbmp-rle-absolute-pad-and-ico-mask-oob-read technical-description exploit
- https://github.com/netsurf-browser/libnsbmp/blob/ea063c9f46acb43e90208da14073332b505ef7e7/src/libnsbmp.c#L942-L982 technical-description
- https://github.com/netsurf-browser/libnsbmp/blob/ea063c9f46acb43e90208da14073332b505ef7e7/src/libnsbmp.c#L1096-L1147 technical-description
- https://download.netsurf-browser.org/libs/releases/libnsbmp-0.1.7-src.tar.gz product
- https://github.com/netsurf-browser/libnsbmp product
- VulnCheck Advisory: NetSurf libnsbmp through 0.1.7 Out-of-Bounds Read in RLE8 and RLE4 Decoders third-party-advisory