]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
wifi: wl1251: validate packet IDs before indexing tx_frames
authorPengpeng Hou <pengpeng@iscas.ac.cn>
Mon, 23 Mar 2026 08:08:45 +0000 (16:08 +0800)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 24 Mar 2026 14:32:31 +0000 (15:32 +0100)
commit0fd56fad9c56356e7fa7a7c52e7ecbf807a44eb0
treee80de5de65d19170c0ab9af875154fce2a3cfd33
parentd049e56b1739101d1c4d81deedb269c52a8dbba0
wifi: wl1251: validate packet IDs before indexing tx_frames

wl1251_tx_packet_cb() uses the firmware completion ID directly to index
the fixed 16-entry wl->tx_frames[] array. The ID is a raw u8 from the
completion block, and the callback does not currently verify that it
fits the array before dereferencing it.

Reject completion IDs that fall outside wl->tx_frames[] and keep the
existing NULL check in the same guard. This keeps the fix local to the
trust boundary and avoids touching the rest of the completion flow.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260323080845.40033-1-pengpeng@iscas.ac.cn
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/ti/wl1251/tx.c