Thread (31 messages) 31 messages, 7 authors, 2024-10-16

Re: [PATCH net-next v3 2/9] Bluetooth: L2CAP: do not leave dangling sk pointer on error in l2cap_sock_create()

flat view

From: Kuniyuki Iwashima <hidden>
Date: 2024-10-14 21:23:47
Also in: linux-bluetooth, linux-can, lkml

From: Ignat Korchagin <redacted>
Date: Mon, 14 Oct 2024 16:38:01 +0100
bt_sock_alloc() allocates the sk object and attaches it to the provided
sock object. On error l2cap_sock_alloc() frees the sk object, but the
dangling pointer is still attached to the sock object, which may create
use-after-free in other code.

Signed-off-by: Ignat Korchagin <redacted>
Reviewed-by: Kuniyuki Iwashima <redacted>

Checked all bt_sock_alloc() paths and confirmed only rfcomm and l2cap
need changes.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help