diff options
| author | Hyunwoo Kim <imv4bel@gmail.com> | 2026-03-20 00:14:58 +0900 |
|---|---|---|
| committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2026-08-21 15:43:27 -0400 |
| commit | 1c08039e3887fafc17dad527333938a379d38f34 (patch) | |
| tree | 95667aaf6c7342aaa1ef61a40ea28cda4fdba3b3 /scripts/objdiff | |
| parent | 486f8908aa587ab2a213bbef39311743e4f8f57a (diff) | |
| download | linux-next-1c08039e3887fafc17dad527333938a379d38f34.tar.gz linux-next-1c08039e3887fafc17dad527333938a379d38f34.zip | |
Bluetooth: RFCOMM: Validate MTU in rfcomm_apply_pn() to prevent infinite loop
rfcomm_apply_pn() accepts the MTU value from a remote PN (Parameter
Negotiation) frame without checking for zero. When the remote peer
sends an MTU of zero, d->mtu is set to 0. This causes the sendmsg
path to enter an infinite loop when fragmenting data, as each fragment
has size == min_t(size_t, len, 0) == 0, so the remaining length never
decreases. The infinite allocation of zero-length skbs exhausts all
system memory.
Fix by clamping d->mtu to RFCOMM_DEFAULT_MTU when the negotiated
value is zero, consistent with the initial value assigned in
rfcomm_dlc_alloc().
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Hyunwoo Kim <imv4bel@gmail.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions
