wifi: mac80211_hwsim: clamp virtio RX length before skb_put
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 5d44fe7c9808c56e136e59147bd932f5491520f1 · < 6dc76371a9a360c29de00df5b11563102d9d675a| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
wifi: mac80211_hwsim: clamp virtio RX length before skb_put
hwsim_virtio_rx_work() passes the virtqueue used-ring length reported by the device straight to skb_put() on a fixed-size receive skb. A backend reporting a length larger than the skb tailroom drives skb_put() past the buffer end and hits skb_over_panic() -- a host-triggerable guest panic (denial of service).
Clamp the length to the skb's available room before skb_put(). A conforming device never reports more than the posted buffer size, so valid frames are unaffected; a truncated over-report then fails the length/header checks in hwsim_virtio_handle_cmd() and is dropped, so truncating rather than dropping here cannot be turned into a parsing problem.
From the CVE record · Linux
The Linux kernel’s mac80211_hwsim virtio receive path trusts a length reported by the backend without checking the receive buffer’s available space. A host-controlled backend that reports an oversized length can trigger a guest kernel panic, causing denial of service.
Teams running Linux kernel guests that use mac80211_hwsim with a virtio backend should check whether their kernel is affected; affected versions were not specified.