Description
In the Linux kernel, the following vulnerability has been resolved: net: mana: Fix TOCTOU double-fetch of hwc_msg_id from DMA buffer In mana_hwc_rx_event_handler(), resp->response.hwc_msg_id is read from DMA-coherent memory and bounds-checked, then mana_hwc_handle_resp() re-reads the same field from the same DMA buffer for test_bit() and pointer arithmetic. DMA-coherent memory is mapped uncacheable on x86 and is shared, unencrypted, in Confidential VMs (SEV-SNP/TDX), so each load goes directly to host-visible memory. A H/W can modify the value between the check and the use, bypassing the bounds validation. Fix this by reading hwc_msg_id exactly once using READ_ONCE() into a stack-local variable in mana_hwc_rx_event_handler(), and passing the validated value as a parameter to mana_hwc_handle_resp().
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
Linux Linux
Default version status: unaffected
ca9c54d2d6a5ab2430c4eda364c77125d62e5e0f to < a201c66edf2ebc6cfdc3813a889ba20fecebfae3affectedca9c54d2d6a5ab2430c4eda364c77125d62e5e0f to < 70ad2dff8d052a85dfef15715b531f38a29108cfaffectedca9c54d2d6a5ab2430c4eda364c77125d62e5e0f to < 566f42fb67a7ebfed6650e407e5b72e6b3e83bf7affectedca9c54d2d6a5ab2430c4eda364c77125d62e5e0f to < 6180a06bbc99fd9114b8db4be6c4d46e40f046efaffectedca9c54d2d6a5ab2430c4eda364c77125d62e5e0f to < 09ec063d87c2dd3fa6f3561361a017bd882e9f37affectedca9c54d2d6a5ab2430c4eda364c77125d62e5e0f to < 3c4db56ccd13dd020fbf43afabaee74a40ec75e4affectedca9c54d2d6a5ab2430c4eda364c77125d62e5e0f to < 35f0f0a2536a4d604b4dbad92c85c4a8fdebb870affected
Linux Linux
Default version status: affected
5.13affected0 to < 5.13unaffected5.15.209 to ≤ 5.15.*unaffected6.1.175 to ≤ 6.1.*unaffected6.6.142 to ≤ 6.6.*unaffected6.12.92 to ≤ 6.12.*unaffected6.18.34 to ≤ 6.18.*unaffected7.0.11 to ≤ 7.0.*unaffected7.1 to ≤ *unaffected
References
- https://git.kernel.org/stable/c/a201c66edf2ebc6cfdc3813a889ba20fecebfae3 ↗
- https://git.kernel.org/stable/c/70ad2dff8d052a85dfef15715b531f38a29108cf ↗
- https://git.kernel.org/stable/c/566f42fb67a7ebfed6650e407e5b72e6b3e83bf7 ↗
- https://git.kernel.org/stable/c/6180a06bbc99fd9114b8db4be6c4d46e40f046ef ↗
- https://git.kernel.org/stable/c/09ec063d87c2dd3fa6f3561361a017bd882e9f37 ↗
- https://git.kernel.org/stable/c/3c4db56ccd13dd020fbf43afabaee74a40ec75e4 ↗
- https://git.kernel.org/stable/c/35f0f0a2536a4d604b4dbad92c85c4a8fdebb870 ↗