WARNING: refcount bug in bnep_session (2)
Subsystems (2)
syzbot
syzbotHello,
syzbot found the following issue on:
HEAD commit: 5d6919055dec Linux 7.1-rc3 git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=165f7bce580000 kernel config: https://syzkaller.appspot.com/x/.config?x=59da38148f3a3d24 dashboard link: https://syzkaller.appspot.com/bug?extid=98baa83c342e86a836d7 compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/dd917153d1cc/disk-5d691905.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/f40450ccdad7/vmlinux-5d691905.xz
kernel image: https://storage.googleapis.com/syzbot-assets/91d021f99576/bzImage-5d691905.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
------------[ cut here ]------------ refcount_t: underflow; use-after-free. WARNING: lib/refcount.c:28 at refcount_warn_saturate+0xf4/0x130 lib/refcount.c:28, CPU#1: kbnepd bnep0/6521 Modules linked in: CPU: 1 UID: 0 PID: 6521 Comm: kbnepd bnep0 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026 RIP: 0010:refcount_warn_saturate+0xf4/0x130 lib/refcount.c:28 Code: cc e8 30 3b 0f fd 48 8d 3d 89 d1 e8 0b 67 48 0f b9 3a e8 1f 3b 0f fd 5b 5d e9 58 4f 94 06 e8 13 3b 0f fd 48 8d 3d 7c d1 e8 0b <67> 48 0f b9 3a e8 02 3b 0f fd 5b 5d c3 cc cc cc cc e8 f6 3a 0f fd RSP: 0018:ffffc900059ff958 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff888052bcdc78 RCX: ffffffff84f96b3b RDX: ffff888020be8000 RSI: ffffffff84f96bcd RDI: ffffffff90e23d50 RBP: 0000000000000003 R08: 0000000000000005 R09: 0000000000000004 R10: 0000000000000003 R11: 0000000000000000 R12: ffff88802b509000 R13: ffff888052bcdc78 R14: ffffffff86352db0 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff888124472000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fea969ea4c0 CR3: 000000005c73e000 CR4: 00000000003526f0 Call Trace: <TASK> __refcount_sub_and_test include/linux/refcount.h:400 [inline] __refcount_dec_and_test include/linux/refcount.h:432 [inline] refcount_dec_and_test include/linux/refcount.h:450 [inline] kref_put include/linux/kref.h:64 [inline] klist_dec_and_del lib/klist.c:206 [inline] klist_put+0x18a/0x1d0 lib/klist.c:217 device_del+0x1b8/0x9b0 drivers/base/core.c:3872 unregister_netdevice_many_notify+0x179e/0x24f0 net/core/dev.c:12453 unregister_netdevice_many net/core/dev.c:12481 [inline] unregister_netdevice_queue net/core/dev.c:12291 [inline] unregister_netdevice_queue+0x30b/0x3c0 net/core/dev.c:12281 unregister_netdevice include/linux/netdevice.h:3444 [inline] unregister_netdev+0x1f/0x60 net/core/dev.c:12499 bnep_session+0x223f/0x2d90 net/bluetooth/bnep/core.c:532 kthread+0x370/0x450 kernel/kthread.c:436 ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 </TASK> ---------------- Code disassembly (best guess): 0: cc int3 1: e8 30 3b 0f fd call 0xfd0f3b36 6: 48 8d 3d 89 d1 e8 0b lea 0xbe8d189(%rip),%rdi # 0xbe8d196 d: 67 48 0f b9 3a ud1 (%edx),%rdi 12: e8 1f 3b 0f fd call 0xfd0f3b36 17: 5b pop %rbx 18: 5d pop %rbp 19: e9 58 4f 94 06 jmp 0x6944f76 1e: e8 13 3b 0f fd call 0xfd0f3b36 23: 48 8d 3d 7c d1 e8 0b lea 0xbe8d17c(%rip),%rdi # 0xbe8d1a6 * 2a: 67 48 0f b9 3a ud1 (%edx),%rdi <-- trapping instruction 2f: e8 02 3b 0f fd call 0xfd0f3b36 34: 5b pop %rbx 35: 5d pop %rbp 36: c3 ret 37: cc int3 38: cc int3 39: cc int3 3a: cc int3 3b: e8 f6 3a 0f fd call 0xfd0f3b36
---
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 [email protected].
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
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
syzbot
syzbotsyzbot has found a reproducer for the following issue on:
syzbot has found a reproducer for the following issue on:
HEAD commit: 818bebeb63dd drm/xe: Don't hand out the flat CCS storage a.. git tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git console output: https://syzkaller.appspot.com/x/log.txt?x=13956d49580000 kernel config: https://syzkaller.appspot.com/x/.config?x=ccca94d2c01b9e78 dashboard link: https://syzkaller.appspot.com/bug?extid=98baa83c342e86a836d7 compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13435625580000
IMPORTANT: if you fix the issue, please add the following tag to the commit:
------------[ cut here ]------------ refcount_t: underflow; use-after-free. WARNING: lib/refcount.c:28 at refcount_warn_saturate+0xf4/0x130 lib/refcount.c:28, CPU#3: kbnepd bnep0/6057 Modules linked in: CPU: 3 UID: 0 PID: 6057 Comm: kbnepd bnep0 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:refcount_warn_saturate+0xf4/0x130 lib/refcount.c:28 Code: 06 e8 70 ca e6 fc 48 8d 3d c9 dd 29 0c 67 48 0f b9 3a e8 5f ca e6 fc 5b 5d c3 cc cc cc cc e8 53 ca e6 fc 48 8d 3d bc dd 29 0c <67> 48 0f b9 3a e8 42 ca e6 fc 5b 5d e9 4b ee a5 06 e8 36 ca e6 fc RSP: 0018:ffffc90005c6f958 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff8880507dfc78 RCX: 0000000000000001 RDX: ffff88803142cb00 RSI: ffffffff8524377d RDI: ffffffff914e1540 RBP: 0000000000000003 R08: 0000000000000005 R09: 0000000000000004 R10: 0000000000000003 R11: 0000000000000000 R12: ffff8880134cd400 R13: ffff8880507dfc78 R14: ffffffff8661d790 R15: ffff888035896000 FS: 0000000000000000(0000) GS:ffff8880d5ea2000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fcfb9c4bd58 CR3: 0000000036184000 CR4: 0000000000352ef0 Call Trace: <TASK> __refcount_sub_and_test include/linux/refcount.h:400 [inline] __refcount_dec_and_test include/linux/refcount.h:432 [inline] refcount_dec_and_test include/linux/refcount.h:450 [inline] kref_put include/linux/kref.h:64 [inline] klist_dec_and_del lib/klist.c:206 [inline] klist_put+0x18a/0x1d0 lib/klist.c:217 device_del+0x1b8/0x9b0 drivers/base/core.c:3942 unregister_netdevice_many_notify+0x1503/0x2150 net/core/dev.c:12551 unregister_netdevice_many net/core/dev.c:12589 [inline] unregister_netdevice_queue net/core/dev.c:12390 [inline] unregister_netdevice_queue+0x30b/0x3c0 net/core/dev.c:12376 unregister_netdevice include/linux/netdevice.h:3487 [inline] unregister_netdev+0x1f/0x60 net/core/dev.c:12697 bnep_session+0x22e6/0x2f40 net/bluetooth/bnep/core.c:544 kthread+0x373/0x450 kernel/kthread.c:436 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 </TASK> ---------------- Code disassembly (best guess), 1 bytes skipped: 0: e8 70 ca e6 fc call 0xfce6ca75 5: 48 8d 3d c9 dd 29 0c lea 0xc29ddc9(%rip),%rdi # 0xc29ddd5 c: 67 48 0f b9 3a ud1 (%edx),%rdi 11: e8 5f ca e6 fc call 0xfce6ca75 16: 5b pop %rbx 17: 5d pop %rbp 18: c3 ret 19: cc int3 1a: cc int3 1b: cc int3 1c: cc int3 1d: e8 53 ca e6 fc call 0xfce6ca75 22: 48 8d 3d bc dd 29 0c lea 0xc29ddbc(%rip),%rdi # 0xc29dde5 * 29: 67 48 0f b9 3a ud1 (%edx),%rdi <-- trapping instruction 2e: e8 42 ca e6 fc call 0xfce6ca75 33: 5b pop %rbx 34: 5d pop %rbp 35: e9 4b ee a5 06 jmp 0x6a5ee85 3a: e8 36 ca e6 fc call 0xfce6ca75
---
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.
Hello,
I would like to investigate this syzbot report:
https://syzkaller.appspot.com/bug?extid=98baa83c342e86a836d7
I checked the dashboard and mailing-list archives on September 2, 2026, and did not find a proposed patch or human response.
Is anyone already working on this issue? If not, I plan to reproduce it on current mainline using the provided C reproducer and investigate whether concurrent BNEPCONNDEL and HCI disconnection cause the reported BNEP device lifetime and refcount failure.
Please let me know if there is related work I should review.
Thanks,
Aditya Pratap Singh