Linux driver-core infrastructure
 help / color / mirror / Atom feed
From: syzbot <syzbot+98baa83c342e86a836d7@syzkaller.appspotmail.com>
To: dakr@kernel.org, driver-core@lists.linux.dev,
	gregkh@linuxfoundation.org,  linux-kernel@vger.kernel.org,
	rafael@kernel.org,  syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [kernel?] WARNING: refcount bug in bnep_session (2)
Date: Thu, 27 Aug 2026 01:15:34 -0700	[thread overview]
Message-ID: <6a8ff226.1d9ded08.62e62.00c8.GAE@google.com> (raw)
In-Reply-To: <6a86bb5c.4d75e56a.c9a88.0039.GAE@google.com>

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:
Reported-by: syzbot+98baa83c342e86a836d7@syzkaller.appspotmail.com

------------[ 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.

      reply	other threads:[~2026-08-27  8:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-20  8:31 [syzbot] [kernel?] WARNING: refcount bug in bnep_session (2) syzbot
2026-08-27  8:15 ` syzbot [this message]

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=6a8ff226.1d9ded08.62e62.00c8.GAE@google.com \
    --to=syzbot+98baa83c342e86a836d7@syzkaller.appspotmail.com \
    --cc=dakr@kernel.org \
    --cc=driver-core@lists.linux.dev \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=syzkaller-bugs@googlegroups.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