summaryrefslogtreecommitdiff
path: root/include/uapi/linux/wimax/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorLukas Johannes Möller <research@johannes-moeller.dev>2026-03-10 21:59:47 +0000
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2026-03-12 15:29:07 -0400
commitdd815e6e3918dc75a49aaabac36e4f024d675101 (patch)
treeb1964fa16520fc2ff756faaff7909ce040517e9e /include/uapi/linux/wimax/git@git.tavy.me:linux.git
parent15145675690cab2de1056e7ed68e59cbd0452529 (diff)
Bluetooth: L2CAP: Validate L2CAP_INFO_RSP payload length before access
l2cap_information_rsp() checks that cmd_len covers the fixed l2cap_info_rsp header (type + result, 4 bytes) but then reads rsp->data without verifying that the payload is present: - L2CAP_IT_FEAT_MASK calls get_unaligned_le32(rsp->data), which reads 4 bytes past the header (needs cmd_len >= 8). - L2CAP_IT_FIXED_CHAN reads rsp->data[0], 1 byte past the header (needs cmd_len >= 5). A truncated L2CAP_INFO_RSP with result == L2CAP_IR_SUCCESS triggers an out-of-bounds read of adjacent skb data. Guard each data access with the required payload length check. If the payload is too short, skip the read and let the state machine complete with safe defaults (feat_mask and remote_fixed_chan remain zero from kzalloc), so the info timer cleanup and l2cap_conn_start() still run and the connection is not stalled. Fixes: 4e8402a3f884 ("[Bluetooth] Retrieve L2CAP features mask on connection setup") Cc: stable@vger.kernel.org Signed-off-by: Lukas Johannes Möller <research@johannes-moeller.dev> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'include/uapi/linux/wimax/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions