Bluetooth: RFCOMM: Validate MTU in rfcomm_apply_pn() to prevent infinite loop
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 5.10.270, 5.15.221, 6.1.188, 6.6.157, 6.12.110, and 2 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
In the Linux kernel, the following vulnerability has been resolved: 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().
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in e7c0aa45ae6c5a338661b23812bfcdef50bf3e96; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in cbc2962da99b6b89345267d3aa74b4b573340548; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in 9b2e5f1928c99224345a9ed8c5dae5fc74964d6d; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in fc4851ff8dfb505e9a19efcc286712132bbd178d; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in f561e44261344adadf9d6a6dff31e3af9776d5c6; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in aeee917a4878af95f0c63e18c5f22eaf6299c7b8; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in 3988cbb1be501dbff909a2ee024670e3c955a66d; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in 44c98fd082eafd49d55a8a4077ff488175b2fe24
- Linux Linux
2.6.12
- KernelLinux
From 2.6.12 · fixed in 5.10.270; From 5.11.0 · fixed in 5.15.221; From 5.16.0 · fixed in 6.1.188; From 6.2.0 · fixed in 6.6.157; From 6.7.0 · fixed in 6.12.110; From 6.13.0 · fixed in 6.18.52; From 6.19.0 · fixed in 7.2.6
References 8
git.kernel.org
- stable/c/e7c0aa45ae6c5a338661b23812bfcdef50bf3e96
- stable/c/cbc2962da99b6b89345267d3aa74b4b573340548
- stable/c/9b2e5f1928c99224345a9ed8c5dae5fc74964d6d
- stable/c/fc4851ff8dfb505e9a19efcc286712132bbd178d
- stable/c/f561e44261344adadf9d6a6dff31e3af9776d5c6
- stable/c/aeee917a4878af95f0c63e18c5f22eaf6299c7b8
- stable/c/3988cbb1be501dbff909a2ee024670e3c955a66d
- stable/c/44c98fd082eafd49d55a8a4077ff488175b2fe24