wifi: rsi: fix heap OOB write on key removal
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ dad0d04fa7ba41ce603a01e8e64967650303e9a2 · < f4f2852b664c3ff1436785cd11258a0ce25b74b3| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
wifi: rsi: fix heap OOB write on key removal
When a key is removed (data == NULL), rsi_hal_load_key() runs:
memset(&set_key[FRAME_DESC_SZ], 0, frame_len - FRAME_DESC_SZ);
set_key is a struct rsi_set_key *, so the subscript is scaled by sizeof(struct rsi_set_key) (160 bytes): &set_key[FRAME_DESC_SZ] is skb->data + 2560, and the memset writes 144 zero bytes starting 2.4KB past the end of the 160-byte skb data buffer, corrupting unrelated heap objects. The intended byte offset would have been (u8 *)set_key + FRAME_DESC_SZ.
The write fires on every DISABLE_KEY callback, so plain disconnects, roams and interface teardowns trigger it on real networks.
The memset is redundant: the whole buffer is zeroed right after allocation, so the frame sent to the device is byte-identical without it. Drop the else branch; normal operation is unaffected.
Discovered by Atuin - Automated Vulnerability Discovery Engine.
From the CVE record · Linux
The Linux kernel’s rsi Wi-Fi driver writes beyond a heap buffer when removing a key. The write occurs on every DISABLE_KEY callback, including during ordinary disconnects, roams and interface teardowns on real networks; the input does not establish an attacker access requirement or whether user interaction is needed.
Engineers running Linux kernels with the rsi Wi-Fi driver should check whether their kernel is affected; no affected versions are specified.