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:46 +0000
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2026-03-12 15:28:46 -0400
commit15145675690cab2de1056e7ed68e59cbd0452529 (patch)
tree68e7ac4af6147af7bb92f6a95afd103b81399af4 /include/uapi/linux/wimax/git@git.tavy.me:linux.git
parent5b3e2052334f2ff6d5200e952f4aa66994d09899 (diff)
Bluetooth: L2CAP: Fix type confusion in l2cap_ecred_reconf_rsp()
l2cap_ecred_reconf_rsp() casts the incoming data to struct l2cap_ecred_conn_rsp (the ECRED *connection* response, 8 bytes with result at offset 6) instead of struct l2cap_ecred_reconf_rsp (2 bytes with result at offset 0). This causes two problems: - The sizeof(*rsp) length check requires 8 bytes instead of the correct 2, so valid L2CAP_ECRED_RECONF_RSP packets are rejected with -EPROTO. - rsp->result reads from offset 6 instead of offset 0, returning wrong data when the packet is large enough to pass the check. Fix by using the correct type. Also pass the already byte-swapped result variable to BT_DBG instead of the raw __le16 field. Fixes: 15f02b910562 ("Bluetooth: L2CAP: Add initial code for Enhanced Credit Based Mode") 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