From: syzbot <syzbot+3609b9b48e68e1fe47fd@syzkaller.appspotmail.com>
To: youjingxiaogao2@gmail.com
Cc: youjingxiaogao2@gmail.com, linux-kernel@vger.kernel.org,
syzkaller-bugs@googlegroups.com
Subject: Re: #syz test
Date: Sun, 08 Feb 2026 12:03:32 -0800 [thread overview]
Message-ID: <6988ec14.050a0220.1ad825.0006.GAE@google.com> (raw)
In-Reply-To: <CAKZCeSX=JVK5OK0GLYry4gkEH9cryp-FG8k9WcR_6FsPsZR6JQ@mail.gmail.com>
> #syz test git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> master
>
> From d5153b84b90fa80ee0d041d1bd28bd465f7913ec Mon Sep 17 00:00:00 2001
> From: Masahiro Kawada <youjingxiaogao2@gmail.com>
> Date: Mon, 9 Feb 2026 04:47:14 +0900
> Subject: [PATCH] Bluetooth: fix use-after-free in hci_conn_drop
>
> Fix a use-after-free in hci_conn_drop triggered via hci_cmd_sync_work.
>
> In hci_conn_del(), hci_cmd_sync_dequeue() is called after
> hci_conn_cleanup() which may have already freed the conn pointer.
> Fix by moving the dequeue before cleanup.
>
> Additionally, le_read_features_complete() calls hci_conn_drop(conn)
> without checking whether conn is still valid. When
> hci_le_read_remote_features_sync() blocks waiting for an HCI event,
> another thread can free conn through hci_conn_del(). Fix by adding
> a hci_conn_valid() check before calling hci_conn_drop().
>
> Reported-by: syzbot+3609b9b48e68e1fe47fd@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=3609b9b48e68e1fe47fd
> Signed-off-by: Masahiro Kawada <youjingxiaogao2@gmail.com>
> ---
> net/bluetooth/hci_conn.c | 6 +++---
> net/bluetooth/hci_sync.c | 3 +++
> 2 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
> index 0795818963a..aa3607327ad 100644
> --- a/net/bluetooth/hci_conn.c
> +++ b/net/bluetooth/hci_conn.c
> @@ -1232,15 +1232,15 @@ void hci_conn_del(struct hci_conn *conn)
> skb_queue_purge(&conn->data_q);
> skb_queue_purge(&conn->tx_q.queue);
>
> + /* Dequeue callbacks using connection pointer as data */
> + hci_cmd_sync_dequeue(hdev, NULL, conn, NULL);
> +
> /* Remove the connection from the list and cleanup its remaining
> * state. This is a separate function since for some cases like
> * BT_CONNECT_SCAN we *only* want the cleanup part without the
> * rest of hci_conn_del.
> */
> hci_conn_cleanup(conn);
> -
> - /* Dequeue callbacks using connection pointer as data */
> - hci_cmd_sync_dequeue(hdev, NULL, conn, NULL);
> }
>
> struct hci_dev *hci_get_route(bdaddr_t *dst, bdaddr_t *src, uint8_t
> src_type)
> diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
> index f04a90bce4a..f31086c187f 100644
> --- a/net/bluetooth/hci_sync.c
> +++ b/net/bluetooth/hci_sync.c
> @@ -7371,6 +7371,9 @@ static void le_read_features_complete(struct hci_dev
> *hdev, void *data, int err)
> if (err == -ECANCELED)
> return;
>
> + if (!hci_conn_valid(hdev, conn))
> + return;
> +
> hci_conn_drop(conn);
> }
>
> --
> 2.43.0
Command #2:
I've failed to parse your command.
Did you perhaps forget to provide the branch name, or added an extra ':'?
Please use one of the two supported formats:
1. #syz test
2. #syz test: repo branch-or-commit-hash
Note the lack of ':' in option 1.
next parent reply other threads:[~2026-02-08 20:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAKZCeSX=JVK5OK0GLYry4gkEH9cryp-FG8k9WcR_6FsPsZR6JQ@mail.gmail.com>
2026-02-08 20:03 ` syzbot [this message]
2026-02-08 20:09 ` kawada
2026-02-08 20:57 ` [syzbot] [bluetooth?] KASAN: slab-use-after-free Write in hci_conn_drop (3) syzbot
2026-02-09 7:50 ` #syz test kawada
2026-02-09 9:05 ` [syzbot] [bluetooth?] KASAN: slab-use-after-free Write in hci_conn_drop (3) syzbot
2026-02-08 20:31 ` syzbot
[not found] <20260520084826.6246-1-souradiptodas6@gmail.com>
2026-05-20 8:48 ` #syz test syzbot
2025-11-10 18:41 [syzbot] [bpf?] KASAN: stack-out-of-bounds Write in __bpf_get_stack syzbot
2026-01-04 18:29 ` #syz test Arnaud Lecomte
2026-01-04 18:30 ` Arnaud Lecomte
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6988ec14.050a0220.1ad825.0006.GAE@google.com \
--to=syzbot+3609b9b48e68e1fe47fd@syzkaller.appspotmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzkaller-bugs@googlegroups.com \
--cc=youjingxiaogao2@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome