summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/syscall-counts.py
diff options
context:
space:
mode:
authorJoas Antonio dos Santos <joasantonio108@gmail.com>2026-11-10 03:26:03 +0000
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2026-11-10 10:41:16 -0500
commit1645edfa8c29e43239cca615cefcb19959d3aa36 (patch)
tree6adf00708e945229453aed522cac912b44803d27 /tools/perf/scripts/python/syscall-counts.py
parent4728474344793dd67956e03a2cb244b71383ef7c (diff)
Bluetooth: L2CAP: validate MPS and MTU in ECRED connection response
l2cap_ecred_conn_rsp() stores the MTU and MPS from the peer without checking them against the minimums required for enhanced credit based channels. The other LE and ECRED handlers (l2cap_le_connect_req(), l2cap_le_connect_rsp(), l2cap_ecred_conn_req(), l2cap_ecred_reconf_req()) all reject values below the minimum. With an MPS below L2CAP_SDULEN_SIZE, the pdu_len computation in l2cap_segment_le_sdu() wraps: pdu_len = chan->remote_mps - L2CAP_SDULEN_SIZE; pdu_len is then clamped to the SDU length, which l2cap_chan_send() has already limited to chan->omtu, so nothing is over-allocated and there is no memory safety issue. The result is that the whole SDU is sent as a single PDU, larger than the MPS the peer announced, and a channel is established with parameters the specification does not allow. Apply the same L2CAP_ECRED_MIN_MTU / L2CAP_ECRED_MIN_MPS checks that l2cap_ecred_conn_req() uses and drop the channel when the response carries smaller values. Found by LLM-assisted manual code review. Fixes: 15f02b910562 ("Bluetooth: L2CAP: Add initial code for Enhanced Credit Based Mode") Signed-off-by: Joas Antonio dos Santos <joasantonio108@gmail.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions