gbsplay through 0.0.103 Out-of-Bounds Read via mapper_map ROM Bank Index
Impact
gbsplay through 0.0.103 contains an out-of-bounds read vulnerability in mapper_map() in mapper.c that fails to reject ROM bank indexes beyond the ROM size, causing an underflowed bank length. Attackers can supply crafted .gbr, .gbs or .gb files with malicious bank indexes to make bank_get() read far past the heap ROM buffer and crash the player.
Source excerpt · VulnCheckAffected packages
Affected products
Vendor version evidence. Product records are separate from automatic dependency matching.
mmitch · gbsplay
Other versions: unaffected
| Version / range | Source status |
|---|---|
| 0 through 0.0.103 (inclusive) | affected |
Original source description
gbsplay through 0.0.103 contains an out-of-bounds read vulnerability in mapper_map() in mapper.c that fails to reject ROM bank indexes beyond the ROM size, causing an underflowed bank length. Attackers can supply crafted .gbr, .gbs or .gb files with malicious bank indexes to make bank_get() read far past the heap ROM buffer and crash the player.
References
- Source reference github.com/mmitch/gbsplay/issues/201
- Source reference github.com/mmitch/gbsplay
- Patch github.com/mmitch/gbsplay/commit/a281d80bc56ed63347daf740a2f7aa4f8516165a
- Source reference github.com/mmitch/gbsplay/blob/0.0.103/mapper.c
- Source reference hackmd.io/@haindpwn/gbsplay-rom-bank-index-oob-read
- Security advisory www.vulncheck.com/advisories/gbsplay-through-0.0.103-out-of-bounds-read-via-mapper-map-rom-bank-index