WARNING: refcount bug in new_device_store

Status: moderation: reported on 2026/08/03 12:38
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+f4d51dee46e7742cc3a1@syzkaller.appspotmail.com
First crash: 5d05h, last: 5d05h
✨ AI Jobs (3)
ID Workflow Result Correct Bug Created Started Finished Revision Error
2abf4f0c assessment-security 💥 WARNING: refcount bug in new_device_store 2026/08/04 00:20 2026/08/04 00:20 2026/08/04 00:20 cb1adeae
dashboard requested TargetOS "linux" TargetArch "386", but agent does not support it
b69a4b7f assessment-security 💥 WARNING: refcount bug in new_device_store 2026/08/02 00:00 2026/08/02 00:00 2026/08/02 00:00 e611ffe1
dashboard requested TargetOS "linux" TargetArch "386", but agent does not support it
4a6ebd1d assessment-security 💥 WARNING: refcount bug in new_device_store 2026/08/01 00:00 2026/08/01 00:00 2026/08/01 00:00 7664cf44
dashboard requested TargetOS "linux" TargetArch "386", but agent does not support it

Sample crash report:
------------[ cut here ]------------
refcount_t: addition on 0; use-after-free.
WARNING: lib/refcount.c:25 at refcount_warn_saturate+0x111/0x130 lib/refcount.c:25, CPU#2: syz-executor/6178
Modules linked in:
CPU: 2 UID: 0 PID: 6178 Comm: syz-executor 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+0x111/0x130 lib/refcount.c:25
Code: cc e8 23 e1 ed fc 48 8d 3d 4c fe 11 0c 67 48 0f b9 3a e8 12 e1 ed fc 5b 5d e9 8b d7 9f 06 e8 06 e1 ed fc 48 8d 3d 3f fe 11 0c <67> 48 0f b9 3a e8 f5 e0 ed fc 5b 5d c3 cc cc cc cc 48 89 df e8 46
RSP: 0018:ffffc900031cfb90 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffffffff9ba2be60 RCX: ffffffff851bcaab
RDX: ffff8880247b4a80 RSI: ffffffff851bcb5a RDI: ffffffff912dc9a0
RBP: 0000000000000002 R08: 0000000000000005 R09: 0000000000000004
R10: 0000000000000002 R11: 0000000000000000 R12: 0000000000000003
R13: 0000000000000000 R14: 0000000000000002 R15: 0000000000000004
FS:  0000000000000000(0000) GS:ffff888096de3000(0063) knlGS:000000005849a480
CS:  0010 DS: 002b ES: 002b CR0: 0000000080050033
CR2: 00000000f50ab669 CR3: 000000004230e000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 __refcount_add include/linux/refcount.h:289 [inline]
 __refcount_inc include/linux/refcount.h:366 [inline]
 refcount_inc include/linux/refcount.h:383 [inline]
 new_device_store+0x682/0x700 drivers/net/netdevsim/bus.c:197
 bus_attr_store+0x74/0xb0 drivers/base/bus.c:172
 sysfs_kf_write+0xf2/0x150 fs/sysfs/file.c:145
 kernfs_fop_write_iter+0x3e0/0x5f0 fs/kernfs/file.c:345
 new_sync_write fs/read_write.c:595 [inline]
 vfs_write+0x6ac/0x1050 fs/read_write.c:687
 ksys_write+0x12a/0x250 fs/read_write.c:739
 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline]
 do_int80_emulation+0x14b/0x720 arch/x86/entry/syscall_32.c:172
 asm_int80_emulation+0x1a/0x20 arch/x86/include/asm/idtentry.h:598
RIP: 0023:0xf710736b
Code: 57 56 53 8b 44 24 14 f6 00 08 75 23 8b 44 24 18 8b 5c 24 1c 8b 4c 24 20 8b 54 24 24 8b 74 24 28 8b 7c 24 2c 8b 6c 24 30 cd 80 <5b> 5e 5f 5d c3 5b 5e 5f 5d e9 f7 a1 ff ff 66 90 66 90 66 90 90 53
RSP: 002b:00000000ffe975ac EFLAGS: 00000246 ORIG_RAX: 0000000000000004
RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 00000000ffe97670
RDX: 0000000000000003 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>
----------------
Code disassembly (best guess):
   0:	cc                   	int3
   1:	e8 23 e1 ed fc       	call   0xfcede129
   6:	48 8d 3d 4c fe 11 0c 	lea    0xc11fe4c(%rip),%rdi        # 0xc11fe59
   d:	67 48 0f b9 3a       	ud1    (%edx),%rdi
  12:	e8 12 e1 ed fc       	call   0xfcede129
  17:	5b                   	pop    %rbx
  18:	5d                   	pop    %rbp
  19:	e9 8b d7 9f 06       	jmp    0x69fd7a9
  1e:	e8 06 e1 ed fc       	call   0xfcede129
  23:	48 8d 3d 3f fe 11 0c 	lea    0xc11fe3f(%rip),%rdi        # 0xc11fe69
* 2a:	67 48 0f b9 3a       	ud1    (%edx),%rdi <-- trapping instruction
  2f:	e8 f5 e0 ed fc       	call   0xfcede129
  34:	5b                   	pop    %rbx
  35:	5d                   	pop    %rbp
  36:	c3                   	ret
  37:	cc                   	int3
  38:	cc                   	int3
  39:	cc                   	int3
  3a:	cc                   	int3
  3b:	48 89 df             	mov    %rbx,%rdi
  3e:	e8                   	.byte 0xe8
  3f:	46                   	rex.RX

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/07/30 12:28 upstream 11028ab62899 abc81b93 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: refcount bug in new_device_store
* Struck through repros no longer work on HEAD.