GHSL-2022-130: Out-of-bounds (OOB) read in openrazer - CVE-2022-23467
A malicious USB device can send a crafted report to the openrazer driver, causing an out-of-bounds read that leaks kernel stack addresses. This may defeat KASLR protections.
A malicious device can send a USB report to the openrazer razermouse driver, resulting in an out-of-bounds (OOB) read.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The driver trusts the device-provided data_size and stages_count values without properly validating them against the actual buffer size, leading to an out-of-bounds read.
Impact
This vulnerability may allow an attacker to leak stack addresses, which may defeat KASLR protections.
What the attacker needed
Physical access to plug in a malicious USB device; user in plugdev group
The fix
The advisory was published and a patch was committed, but the text does not describe the fix details.
How it was found
- Plug in a malicious device with the specified values.
- Find your device under /sys/bus/hid/devices.
- Read from the dpi_stages attribute to leak the kernel address.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A USB device can send more data than the driver expects, and the driver reads past the end of a buffer. This leaks memory addresses from the kernel, which helps attackers bypass a security feature called KASLR that randomises memory layout.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.