]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Bluetooth: SCO: Fix UAF on sco_sock_timeout
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 22 Oct 2024 16:31:08 +0000 (12:31 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 May 2025 05:44:25 +0000 (07:44 +0200)
commit74a466a15731a754bcd8b5a83c126b5122e15a45
treef47657d98249f2f9e060ed94e44adbecd0ad11c9
parente7d3a0c7bf77b884e3c6d9229d8b707050bec57a
Bluetooth: SCO: Fix UAF on sco_sock_timeout

commit 1bf4470a3939c678fb822073e9ea77a0560bc6bb upstream.

conn->sk maybe have been unlinked/freed while waiting for sco_conn_lock
so this checks if the conn->sk is still valid by checking if it part of
sco_sk_list.

Reported-by: syzbot+4c0d0c4cde787116d465@syzkaller.appspotmail.com
Tested-by: syzbot+4c0d0c4cde787116d465@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=4c0d0c4cde787116d465
Fixes: ba316be1b6a0 ("Bluetooth: schedule SCO timeouts with delayed_work")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/net/bluetooth/bluetooth.h
net/bluetooth/af_bluetooth.c
net/bluetooth/sco.c