Description
In the Linux kernel, the following vulnerability has been resolved: Bluetooth: btmtksdio: Fix out-of-bounds DMA read in the TX path btmtksdio_tx_packet() rounds the transfer size up to the SDIO block size of 256 bytes, but hands the host controller the SKB buffer as is: err = sdio_writesb(bdev->func, MTK_REG_CTDR, skb->data, round_up(skb->len, MTK_SDIO_BLOCK_SIZE)); Only skb->len bytes hold packet data, so the controller reads up to 255 bytes of uninitialised memory and sends it to the device over the SDIO bus. Depending on how much tailroom slack the SKB allocation happens to carry, that read can also extend past the end of the buffer. Compute the padded length up front, ensure the SKB has tailroom for it, and zero-fill the padding with skb_put_zero(). skb->len then covers the padding, so sdio_writesb() no longer needs to round up. byte_tx keeps counting the header and the payload only, and the error path restores the SKB so that the caller can requeue it. Writing behind skb->tail is only safe because the driver owns the buffer, which "Bluetooth: btmtksdio: Take exclusive ownership of the SKB before TX" ensures.
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
9aebfd4a2200ab8075e44379c758bccefdc589bb to < c8742f53c9ef623decd5285403df0e5b5273c9fdaffected9aebfd4a2200ab8075e44379c758bccefdc589bb to < 0b71a6caaf284915c8cf9cd320ecee9f0361824aaffected9aebfd4a2200ab8075e44379c758bccefdc589bb to < 9a785ea864214aaffd8300683825c3f788d0b634affected9aebfd4a2200ab8075e44379c758bccefdc589bb to < 7b37556d7d801b79096c7ba8ea92db2338aa8b00affected9aebfd4a2200ab8075e44379c758bccefdc589bb to < 7b80d2701a68456c536f82e577dbed2f60ccb82baffected9aebfd4a2200ab8075e44379c758bccefdc589bb to < fa0ad2d277c7adead61d1c22411c55cea6990c2aaffected
Linux Linux
Default version status: affected
5.2affected0 to < 5.2unaffected6.1.188 to ≤ 6.1.*unaffected6.6.157 to ≤ 6.6.*unaffected6.12.110 to ≤ 6.12.*unaffected6.18.52 to ≤ 6.18.*unaffected7.2.6 to ≤ 7.2.*unaffected7.3 to ≤ *unaffected
References
- https://git.kernel.org/stable/c/c8742f53c9ef623decd5285403df0e5b5273c9fd ↗
- https://git.kernel.org/stable/c/0b71a6caaf284915c8cf9cd320ecee9f0361824a ↗
- https://git.kernel.org/stable/c/9a785ea864214aaffd8300683825c3f788d0b634 ↗
- https://git.kernel.org/stable/c/7b37556d7d801b79096c7ba8ea92db2338aa8b00 ↗
- https://git.kernel.org/stable/c/7b80d2701a68456c536f82e577dbed2f60ccb82b ↗
- https://git.kernel.org/stable/c/fa0ad2d277c7adead61d1c22411c55cea6990c2a ↗