* Re: #syz test
[not found] <20260520084826.6246-1-souradiptodas6@gmail.com>
@ 2026-05-20 8:48 ` syzbot
0 siblings, 0 replies; 6+ messages in thread
From: syzbot @ 2026-05-20 8:48 UTC (permalink / raw)
To: souradiptodas6; +Cc: souradiptodas6, linux-kernel, syzkaller-bugs
> From c3f773691e3c568d67d8628ffd4b7cf25ba8e150 Mon Sep 17 00:00:00 2001
> From: Souradipto Das <souradiptodas6@gmail.com>
> Date: Wed, 20 May 2026 14:11:05 +0530
> Subject: [PATCH] #syz test KVM: x86/xen: Secure gpc refresh_lock mutual
> exclusion in shared info init
>
> ---
> arch/x86/kvm/xen.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/x86/kvm/xen.c b/arch/x86/kvm/xen.c
> index 91fd3673c09a..421e4359ce0d 100644
> --- a/arch/x86/kvm/xen.c
> +++ b/arch/x86/kvm/xen.c
> @@ -45,6 +45,8 @@ static int kvm_xen_shared_info_init(struct kvm *kvm)
> int ret = 0;
> int idx = srcu_read_lock(&kvm->srcu);
>
> + mutex_lock(&gpc->refresh_lock);
> +
> read_lock_irq(&gpc->lock);
> while (!kvm_gpc_check(gpc, PAGE_SIZE)) {
> read_unlock_irq(&gpc->lock);
> @@ -101,6 +103,7 @@ static int kvm_xen_shared_info_init(struct kvm *kvm)
> kvm_make_all_cpus_request(kvm, KVM_REQ_MASTERCLOCK_UPDATE);
>
> out:
> + mutex_unlock(&gpc->refresh_lock);
> srcu_read_unlock(&kvm->srcu, idx);
> return ret;
> }
> --
> 2.43.0
>
This crash does not have a reproducer. I cannot test it.
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <CAKZCeSX=JVK5OK0GLYry4gkEH9cryp-FG8k9WcR_6FsPsZR6JQ@mail.gmail.com>]
* Re: #syz test
[not found] <CAKZCeSX=JVK5OK0GLYry4gkEH9cryp-FG8k9WcR_6FsPsZR6JQ@mail.gmail.com>
@ 2026-02-08 20:03 ` syzbot
2026-02-08 20:09 ` kawada
0 siblings, 1 reply; 6+ messages in thread
From: syzbot @ 2026-02-08 20:03 UTC (permalink / raw)
To: youjingxiaogao2; +Cc: youjingxiaogao2, linux-kernel, syzkaller-bugs
> #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.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: #syz test
2026-02-08 20:03 ` syzbot
@ 2026-02-08 20:09 ` kawada
2026-02-09 7:50 ` kawada
0 siblings, 1 reply; 6+ messages in thread
From: kawada @ 2026-02-08 20:09 UTC (permalink / raw)
To: syzbot; +Cc: linux-kernel, syzkaller-bugs
[-- Attachment #1.1: Type: text/plain, Size: 3233 bytes --]
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
master
2026年2月9日(月) 5:03 syzbot <
syzbot+3609b9b48e68e1fe47fd@syzkaller.appspotmail.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.
>
>
[-- Attachment #1.2: Type: text/html, Size: 4515 bytes --]
[-- Attachment #2: 0001-Bluetooth-fix-use-after-free-in-hci_conn_drop.patch --]
[-- Type: application/octet-stream, Size: 2351 bytes --]
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: #syz test
2026-02-08 20:09 ` kawada
@ 2026-02-09 7:50 ` kawada
0 siblings, 0 replies; 6+ messages in thread
From: kawada @ 2026-02-09 7:50 UTC (permalink / raw)
To: syzbot; +Cc: linux-kernel, syzkaller-bugs
[-- Attachment #1.1: Type: text/plain, Size: 3479 bytes --]
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
master
2026年2月9日(月) 5:09 kawada <youjingxiaogao2@gmail.com>:
> #syz test: git://
> git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
>
> 2026年2月9日(月) 5:03 syzbot <
> syzbot+3609b9b48e68e1fe47fd@syzkaller.appspotmail.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.
>>
>>
[-- Attachment #1.2: Type: text/html, Size: 5078 bytes --]
[-- Attachment #2: 0001-Bluetooth-fix-use-after-free-in-hci_conn_drop.patch --]
[-- Type: application/octet-stream, Size: 2579 bytes --]
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().
Fixes: 881559af5f5c ("Bluetooth: hci_sync: Attempt to dequeue connection attempt")
Fixes: a106e50be74b ("Bluetooth: HCI: Add support for LL Extended Feature Set")
Reported-by: syzbot+3609b9b48e68e1fe47fd@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=3609b9b48e68e1fe47fd
Tested-by: syzbot+3609b9b48e68e1fe47fd@syzkaller.appspotmail.com
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [syzbot] [bpf?] KASAN: stack-out-of-bounds Write in __bpf_get_stack
@ 2025-11-10 18:41 syzbot
2026-01-04 18:29 ` #syz test Arnaud Lecomte
2026-01-04 18:30 ` Arnaud Lecomte
0 siblings, 2 replies; 6+ messages in thread
From: syzbot @ 2025-11-10 18:41 UTC (permalink / raw)
To: andrii, ast, bpf, contact, daniel, eddyz87, haoluo,
john.fastabend, jolsa, kpsingh, linux-kernel, martin.lau, netdev,
sdf, song, syzkaller-bugs, yonghong.song
Hello,
syzbot found the following issue on:
HEAD commit: f8c67d8550ee bpf: Use kmalloc_nolock() in range tree
git tree: bpf-next
console output: https://syzkaller.appspot.com/x/log.txt?x=121a50b4580000
kernel config: https://syzkaller.appspot.com/x/.config?x=e46b8a1c645465a9
dashboard link: https://syzkaller.appspot.com/bug?extid=d1b7fa1092def3628bd7
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12270412580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=128bd084580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/d9e95bfbe4ee/disk-f8c67d85.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/0766b6dd0e91/vmlinux-f8c67d85.xz
kernel image: https://storage.googleapis.com/syzbot-assets/79089f9e9e93/bzImage-f8c67d85.xz
The issue was bisected to:
commit e17d62fedd10ae56e2426858bd0757da544dbc73
Author: Arnaud Lecomte <contact@arnaud-lcm.com>
Date: Sat Oct 25 19:28:58 2025 +0000
bpf: Refactor stack map trace depth calculation into helper function
bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1632d0b4580000
final oops: https://syzkaller.appspot.com/x/report.txt?x=1532d0b4580000
console output: https://syzkaller.appspot.com/x/log.txt?x=1132d0b4580000
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+d1b7fa1092def3628bd7@syzkaller.appspotmail.com
Fixes: e17d62fedd10 ("bpf: Refactor stack map trace depth calculation into helper function")
==================================================================
BUG: KASAN: stack-out-of-bounds in __bpf_get_stack+0x5a3/0xaa0 kernel/bpf/stackmap.c:493
Write of size 168 at addr ffffc900030e73a8 by task syz.1.44/6108
CPU: 0 UID: 0 PID: 6108 Comm: syz.1.44 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
Call Trace:
<TASK>
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xca/0x240 mm/kasan/report.c:482
kasan_report+0x118/0x150 mm/kasan/report.c:595
check_region_inline mm/kasan/generic.c:-1 [inline]
kasan_check_range+0x2b0/0x2c0 mm/kasan/generic.c:200
__asan_memcpy+0x40/0x70 mm/kasan/shadow.c:106
__bpf_get_stack+0x5a3/0xaa0 kernel/bpf/stackmap.c:493
____bpf_get_stack kernel/bpf/stackmap.c:517 [inline]
bpf_get_stack+0x33/0x50 kernel/bpf/stackmap.c:514
____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1653 [inline]
bpf_get_stack_raw_tp+0x1a9/0x220 kernel/trace/bpf_trace.c:1643
bpf_prog_4b3f8e3d902f6f0d+0x41/0x49
bpf_dispatcher_nop_func include/linux/bpf.h:1364 [inline]
__bpf_prog_run include/linux/filter.h:721 [inline]
bpf_prog_run include/linux/filter.h:728 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2075 [inline]
bpf_trace_run2+0x284/0x4b0 kernel/trace/bpf_trace.c:2116
__traceiter_kfree+0x2e/0x50 include/trace/events/kmem.h:97
__do_trace_kfree include/trace/events/kmem.h:97 [inline]
trace_kfree include/trace/events/kmem.h:97 [inline]
kfree+0x62f/0x6d0 mm/slub.c:6824
compute_scc+0x9a6/0xa20 kernel/bpf/verifier.c:25021
bpf_check+0x5df2/0x1c210 kernel/bpf/verifier.c:25162
bpf_prog_load+0x13ba/0x1a10 kernel/bpf/syscall.c:3095
__sys_bpf+0x507/0x860 kernel/bpf/syscall.c:6171
__do_sys_bpf kernel/bpf/syscall.c:6281 [inline]
__se_sys_bpf kernel/bpf/syscall.c:6279 [inline]
__x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:6279
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fc4d8b8f6c9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffcd2851bb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007fc4d8de5fa0 RCX: 00007fc4d8b8f6c9
RDX: 0000000000000094 RSI: 00002000000000c0 RDI: 0000000000000005
RBP: 00007fc4d8c11f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fc4d8de5fa0 R14: 00007fc4d8de5fa0 R15: 0000000000000003
</TASK>
The buggy address belongs to stack of task syz.1.44/6108
and is located at offset 296 in frame:
__bpf_get_stack+0x0/0xaa0 include/linux/mmap_lock.h:-1
This frame has 1 object:
[32, 36) 'rctx.i'
The buggy address belongs to a 8-page vmalloc region starting at 0xffffc900030e0000 allocated at copy_process+0x54b/0x3c00 kernel/fork.c:2012
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x572fb
memcg:ffff88803037aa02
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000000000 00000001ffffffff ffff88803037aa02
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2dc2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_ZERO|__GFP_NOWARN), pid 1340, tgid 1340 (kworker/u8:6), ts 107851542040, free_ts 101175357499
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1850
prep_new_page mm/page_alloc.c:1858 [inline]
get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3884
__alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5183
alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416
alloc_frozen_pages_noprof mm/mempolicy.c:2487 [inline]
alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2507
vm_area_alloc_pages mm/vmalloc.c:3647 [inline]
__vmalloc_area_node mm/vmalloc.c:3724 [inline]
__vmalloc_node_range_noprof+0x96c/0x12d0 mm/vmalloc.c:3897
__vmalloc_node_noprof+0xc2/0x110 mm/vmalloc.c:3960
alloc_thread_stack_node kernel/fork.c:311 [inline]
dup_task_struct+0x3d4/0x830 kernel/fork.c:881
copy_process+0x54b/0x3c00 kernel/fork.c:2012
kernel_clone+0x21e/0x840 kernel/fork.c:2609
user_mode_thread+0xdd/0x140 kernel/fork.c:2685
call_usermodehelper_exec_sync kernel/umh.c:132 [inline]
call_usermodehelper_exec_work+0x9c/0x230 kernel/umh.c:163
process_one_work kernel/workqueue.c:3263 [inline]
process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3346
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3427
kthread+0x711/0x8a0 kernel/kthread.c:463
ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158
page last free pid 5918 tgid 5918 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1394 [inline]
__free_frozen_pages+0xbc4/0xd30 mm/page_alloc.c:2906
vfree+0x25a/0x400 mm/vmalloc.c:3440
kcov_put kernel/kcov.c:439 [inline]
kcov_close+0x28/0x50 kernel/kcov.c:535
__fput+0x44c/0xa70 fs/file_table.c:468
task_work_run+0x1d4/0x260 kernel/task_work.c:227
exit_task_work include/linux/task_work.h:40 [inline]
do_exit+0x6b5/0x2300 kernel/exit.c:966
do_group_exit+0x21c/0x2d0 kernel/exit.c:1107
get_signal+0x1285/0x1340 kernel/signal.c:3034
arch_do_signal_or_restart+0xa0/0x790 arch/x86/kernel/signal.c:337
exit_to_user_mode_loop+0x72/0x130 kernel/entry/common.c:40
exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline]
do_syscall_64+0x2bd/0xfa0 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffffc900030e7300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc900030e7380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc900030e7400: f1 f1 f1 f1 00 00 f2 f2 00 00 f3 f3 00 00 00 00
^
ffffc900030e7480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc900030e7500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
For information about bisection process see: https://goo.gl/tpsmEJ#bisection
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
^ permalink raw reply [flat|nested] 6+ messages in thread* #syz test
2025-11-10 18:41 [syzbot] [bpf?] KASAN: stack-out-of-bounds Write in __bpf_get_stack syzbot
@ 2026-01-04 18:29 ` Arnaud Lecomte
2026-01-04 18:30 ` Arnaud Lecomte
1 sibling, 0 replies; 6+ messages in thread
From: Arnaud Lecomte @ 2026-01-04 18:29 UTC (permalink / raw)
To: syzbot+d1b7fa1092def3628bd7; +Cc: contact, linux-kernel, syzkaller-bugs
diff --git a/kernel/bpf/stackmap.c b/kernel/bpf/stackmap.c
index 2365541c81dd..b8ff4ccae2d6 100644
--- a/kernel/bpf/stackmap.c
+++ b/kernel/bpf/stackmap.c
@@ -465,7 +465,6 @@ static long __bpf_get_stack(struct pt_regs *regs, struct task_struct *task,
if (trace_in) {
trace = trace_in;
- trace->nr = min_t(u32, trace->nr, max_depth);
} else if (kernel && task) {
trace = get_callchain_entry_for_task(task, max_depth);
} else {
@@ -479,7 +478,8 @@ static long __bpf_get_stack(struct pt_regs *regs, struct task_struct *task,
goto err_fault;
}
- trace_nr = trace->nr - skip;
+ trace_nr = min(trace->nr, max_depth);
+ trace_nr = trace_nr - skip;
copy_len = trace_nr * elem_size;
ips = trace->ip + skip;
--
2.43.0
^ permalink raw reply [flat|nested] 6+ messages in thread* #syz test
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
1 sibling, 0 replies; 6+ messages in thread
From: Arnaud Lecomte @ 2026-01-04 18:30 UTC (permalink / raw)
To: syzbot+d1b7fa1092def3628bd7; +Cc: contact, linux-kernel, syzkaller-bugs
#syz test
diff --git a/kernel/bpf/stackmap.c b/kernel/bpf/stackmap.c
index 2365541c81dd..b8ff4ccae2d6 100644
--- a/kernel/bpf/stackmap.c
+++ b/kernel/bpf/stackmap.c
@@ -465,7 +465,6 @@ static long __bpf_get_stack(struct pt_regs *regs, struct task_struct *task,
if (trace_in) {
trace = trace_in;
- trace->nr = min_t(u32, trace->nr, max_depth);
} else if (kernel && task) {
trace = get_callchain_entry_for_task(task, max_depth);
} else {
@@ -479,7 +478,8 @@ static long __bpf_get_stack(struct pt_regs *regs, struct task_struct *task,
goto err_fault;
}
- trace_nr = trace->nr - skip;
+ trace_nr = min(trace->nr, max_depth);
+ trace_nr = trace_nr - skip;
copy_len = trace_nr * elem_size;
ips = trace->ip + skip;
--
2.43.0
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-05-20 8:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20260520084826.6246-1-souradiptodas6@gmail.com>
2026-05-20 8:48 ` #syz test syzbot
[not found] <CAKZCeSX=JVK5OK0GLYry4gkEH9cryp-FG8k9WcR_6FsPsZR6JQ@mail.gmail.com>
2026-02-08 20:03 ` syzbot
2026-02-08 20:09 ` kawada
2026-02-09 7:50 ` kawada
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
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