summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorAldo Ariel Panzardo <qwe.aldo@gmail.com>2026-09-15 13:02:39 -0300
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2026-09-16 13:51:34 -0400
commit6c78a213d9070b610c7f418af2c25b66180b7e37 (patch)
treedb1a14e322699b55166b07f6d08821d00fef238b /tools/perf/scripts/python/stackcollapse.py
parent4c94557dd02569efa6c1072a0439addaef9a5224 (diff)
downloadlinux-6c78a213d9070b610c7f418af2c25b66180b7e37.tar.gz
linux-6c78a213d9070b610c7f418af2c25b66180b7e37.zip
Bluetooth: L2CAP: validate frame length before control and FCS access
l2cap_data_rcv() unpacks either a two-byte or four-byte control field without first ensuring that it is present. A short ERTM or streaming-mode frame can therefore cause an out-of-bounds read. There is a second short-frame case when CRC16 is enabled. After the control field is pulled, l2cap_check_fcs() subtracts two from skb->len without checking it. If fewer than two bytes remain, the subtraction wraps; skb_trim() leaves the buffer unchanged and the subsequent FCS load reads past the logical end of the frame. Validate that the frame contains both its control field and, when enabled, its FCS before either field is accessed. Fixes: 1c2acffb76d4 ("Bluetooth: Add initial support for ERTM packets transfers") Fixes: fcc203c30d72 ("Bluetooth: Add support for FCS option to L2CAP") Cc: stable@vger.kernel.org Signed-off-by: Aldo Ariel Panzardo <qwe.aldo@gmail.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions