Thread (4 messages) flat view 4 messages, 3 authors, 11h ago
HOTtoday

[PATCH v2 1/2] Bluetooth: ISO: Fix parent socket leak in iso_conn_ready()

From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Date: 2026-09-10 18:12:17
Subsystem: bluetooth subsystem, the rest · Maintainers: Marcel Holtmann, Luiz Augusto von Dentz, Linus Torvalds

From: Luiz Augusto von Dentz <redacted>

iso_get_sock() returns the parent socket with a reference held, which is
dropped by sock_put() once the child socket has been set up. The error
path taken when iso_sock_alloc() fails only calls release_sock() and
returns, leaking the reference and thus the parent socket itself.

Drop the reference on that path as well.

Fixes: b9858430f759 ("Bluetooth: ISO: Fix possible UAF on iso_conn_free")
Signed-off-by: Luiz Augusto von Dentz <redacted>
---
 net/bluetooth/iso.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/net/bluetooth/iso.c b/net/bluetooth/iso.c
index 75bfd5938b2e..4de332b8901f 100644
--- a/net/bluetooth/iso.c
+++ b/net/bluetooth/iso.c
@@ -2289,6 +2289,7 @@ static void iso_conn_ready(struct iso_conn *conn)
 				    BTPROTO_ISO, GFP_ATOMIC, 0);
 		if (!sk) {
 			release_sock(parent);
+			sock_put(parent);
 			return;
 		}
 
-- 
2.55.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help