Bluetooth: RFCOMM: free the skb when the DLC has no owner
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel c3f76b025cbbb0ab47310dbe7de18092d89f2a99, Kernel 05145638e0db770267c39615c8ce51ab058e34cf, Kernel 4f46de658ce61968aef5ea7ae809d1c180330544 and 12 more.
In the Linux kernel, the following vulnerability has been resolved: Bluetooth: RFCOMM: free the skb when the DLC has no owner rfcomm_recv_data() hands the skb to d->data_ready() and returns 0 without freeing it, so the callback owns the skb from that point on. The tty implementation frees it when the DLC has been detached from its device: static void rfcomm_dev_data_ready(struct rfcomm_dlc *dlc, struct sk_buff *skb) { struct rfcomm_dev *dev = dlc->owner; if (!dev) { kfree_skb(skb); return; } The socket implementation returns without freeing it, and the skb is leaked. A connected DLC can have no owner: rfcomm_sock_destruct() clears d->owner, while the DLC itself stays on the session until it is closed. Data frames that arrive in that window still find d->state == BT_CONNECTED in rfcomm_recv_data() and are handed to the callback, one leaked skb each. The leak does not stop on its own either. The remote runs out of credits only once RFCOMM_RX_THROTTLED is set, and for a socket the only place that sets it is rfcomm_sk_data_ready() itself, below the return. rfcomm_process_dlcs() keeps granting credits, so the remote keeps sending and the leak keeps growing. Free the skb, as the tty side does.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| Linux | Kernel | >=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 <c3f76b025cbbb0ab47310dbe7de18092d89f2a99, >=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 <05145638e0db770267c39615c8ce51ab058e34cf, >=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 <4f46de658ce61968aef5ea7ae809d1c180330544, >=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 <91492e9194f3b10bc1eb50683ac440b74a487e39, >=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 <9d1afbf60ed53c5b051cd124153e0ae3078c8b93, >=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 <a54ce160e3ef7e50ec94e0ac4131c3d0f9f739b9, >=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 <a835b7f445427c7bdfc7169a97e0a1bec375e408, >=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 <b8814161b14c610b7a09527433301d8ad8180aef, =2.6.12 | c3f76b025cbbb0ab47310dbe7de18092d89f2a99, 05145638e0db770267c39615c8ce51ab058e34cf, 4f46de658ce61968aef5ea7ae809d1c180330544, 91492e9194f3b10bc1eb50683ac440b74a487e39, 9d1afbf60ed53c5b051cd124153e0ae3078c8b93, a54ce160e3ef7e50ec94e0ac4131c3d0f9f739b9, a835b7f445427c7bdfc7169a97e0a1bec375e408, b8814161b14c610b7a09527433301d8ad8180aef |
| linux-kernel: Kernel | >=5.11.0 <5.15.224, >=5.16.0 <6.1.191, >=6.13.0 <6.18.57, >=6.19.0 <7.2.11, >=6.2.0 <6.6.160, >=6.7.0 <6.12.113, >=2.6.12 <5.10.273 | 5.15.224, 6.1.191, 6.18.57, 7.2.11, 6.6.160, 6.12.113, 5.10.273 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in Kernel, strongest first
Embed
A live severity badge for an advisory, README or ticket