]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Bluetooth: ISO: don't leak skb in ISO_CONT RX
authorPauli Virtanen <pav@iki.fi>
Mon, 22 Sep 2025 18:11:22 +0000 (21:11 +0300)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Sat, 27 Sep 2025 15:37:43 +0000 (11:37 -0400)
For ISO_CONT RX, the data from skb is copied to conn->rx_skb, but the
skb is leaked.

Free skb after copying its data.

Fixes: ccf74f2390d6 ("Bluetooth: Add BTPROTO_ISO socket type")
Signed-off-by: Pauli Virtanen <pav@iki.fi>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/iso.c

index ad5c8118a6e3dbd3550da2be34feddbddeabdcb7..9b263d061e051e8f58e1df41dff48a8b27a81422 100644 (file)
@@ -2427,7 +2427,7 @@ void iso_recv(struct hci_conn *hcon, struct sk_buff *skb, u16 flags)
                skb_copy_from_linear_data(skb, skb_put(conn->rx_skb, skb->len),
                                          skb->len);
                conn->rx_len -= skb->len;
-               return;
+               break;
 
        case ISO_END:
                skb_copy_from_linear_data(skb, skb_put(conn->rx_skb, skb->len),