WARNING: refcount bug in config_item_get

Status: premoderation: reported C repro on 2026/07/28 17:48
Reported-by: syzbot+5e849ced214eddf56628@syzkaller.appspotmail.com
First crash: 52d, last: 30d
Bug presence (2)
Date Name Commit Repro Result
2026/08/09 lts (merge base) [unknown] C Failed due to an error; will retry later
2026/08/09 upstream (ToT) [unknown] C Failed due to an error; will retry later
Similar bugs (4)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING: refcount bug in config_item_get prio:normal fs 13 syz, C error 41 18d 52d 0/29 upstream: reported C repro on 2026/07/29 00:08
linux-6.1 WARNING: refcount bug in config_item_get origin:lts-only 13 syz, C 3 6d03h 52d 0/3 upstream: reported C repro on 2026/07/28 10:20
linux-6.6 WARNING: refcount bug in config_item_get origin:upstream 13 syz, C 2 9d02h 41d 0/2 upstream: reported C repro on 2026/08/09 02:31
linux-5.15 WARNING: refcount bug in config_item_get origin:upstream 13 syz, C error 1 55d 55d 0/3 upstream: reported C repro on 2026/07/25 20:51
Last patch testing requests (4)
Created Duration User Patch Repo Result
2026/08/17 21:20 16m retest repro android16-6.12 report job log log
2026/08/17 21:20 9m retest repro android16-6.12 report job log log
2026/08/17 21:20 12m retest repro android16-6.12 report job log log
2026/08/17 21:20 14m retest repro android16-6.12 report job log log

Sample crash report:
------------[ cut here ]------------
refcount_t: addition on 0; use-after-free.
WARNING: CPU: 0 PID: 482 at lib/refcount.c:25 refcount_warn_saturate+0xfd/0x1c0 lib/refcount.c:25
Modules linked in:
CPU: 0 UID: 0 PID: 482 Comm: syz-executor114 Not tainted syzkaller #0 03d350d479d1c05c2ac57b56e0973d7fc75f4bbd
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
RIP: 0010:refcount_warn_saturate+0xfd/0x1c0 lib/refcount.c:25
Code: 00 00 00 e8 95 71 d8 fe 5b 41 5e 5d c3 cc cc cc cc cc e8 86 71 d8 fe c6 05 03 4f 36 05 01 48 c7 c7 40 f0 51 86 e8 a3 49 55 fe <0f> 0b eb da e8 6a 71 d8 fe c6 05 e8 4e 36 05 01 48 c7 c7 a0 f0 51
RSP: 0018:ffffc90001cf7c38 EFLAGS: 00010246
RAX: 92b6b9031cdb8b00 RBX: 0000000000000002 RCX: ffff88810dfdcc00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000002
RBP: ffffc90001cf7c48 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffffbfff0e9f34c R12: ffff8881152e1120
R13: dffffc0000000000 R14: ffff888114b05e1c R15: 0000000000000000
FS:  00005555911343c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200000000040 CR3: 00000001150c4000 CR4: 00000000003526b0
Call Trace:
 <TASK>
 __refcount_add include/linux/refcount.h:-1 [inline]
 __refcount_inc include/linux/refcount.h:366 [inline]
 refcount_inc include/linux/refcount.h:383 [inline]
 kref_get include/linux/kref.h:45 [inline]
 config_item_get+0x95/0xa0 fs/configfs/item.c:104
 configfs_get_config_item fs/configfs/configfs_internal.h:128 [inline]
 get_target fs/configfs/symlink.c:125 [inline]
 configfs_symlink+0x455/0x1050 fs/configfs/symlink.c:191
 vfs_symlink+0x3f4/0x620 fs/namei.c:4623
 do_symlinkat+0x1ba/0x400 fs/namei.c:4649
 __do_sys_symlinkat fs/namei.c:4665 [inline]
 __se_sys_symlinkat fs/namei.c:4662 [inline]
 __x64_sys_symlinkat+0x99/0xb0 fs/namei.c:4662
 x64_sys_call+0x1f79/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:267
 do_syscall_x64 arch/x86/entry/common.c:47 [inline]
 do_syscall_64+0x57/0xf0 arch/x86/entry/common.c:78
 entry_SYSCALL_64_after_hwframe+0x76/0x7e
RIP: 0033:0x7f489103f659
Code: c0 79 93 eb d5 48 8d 7c 1d 00 eb 99 0f 1f 44 00 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 d8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff54b1d4b8 EFLAGS: 00000246 ORIG_RAX: 000000000000010a
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f489103f659
RDX: 00002000000002c0 RSI: 00000000ffffff9c RDI: 0000200000000280
RBP: 0000000000000000 R08: 000000000000003d R09: 000000000000003d
R10: 000000000000003d R11: 0000000000000246 R12: 00007fff54b1d4d8
R13: 00007fff54b1d4f0 R14: 00007fff54b1d530 R15: 0000000000000024
 </TASK>
---[ end trace 0000000000000000 ]---
==================================================================
BUG: KASAN: slab-use-after-free in instrument_atomic_read_write include/linux/instrumented.h:96 [inline]
BUG: KASAN: slab-use-after-free in atomic_fetch_sub_release include/linux/atomic/atomic-instrumented.h:400 [inline]
BUG: KASAN: slab-use-after-free in __refcount_sub_and_test include/linux/refcount.h:389 [inline]
BUG: KASAN: slab-use-after-free in __refcount_dec_and_test include/linux/refcount.h:432 [inline]
BUG: KASAN: slab-use-after-free in refcount_dec_and_test include/linux/refcount.h:450 [inline]
BUG: KASAN: slab-use-after-free in kref_put include/linux/kref.h:64 [inline]
BUG: KASAN: slab-use-after-free in config_item_put+0x37/0x240 fs/configfs/item.c:149
Write of size 4 at addr ffff888114b05e1c by task syz-executor114/482

CPU: 0 UID: 0 PID: 482 Comm: syz-executor114 Tainted: G        W          syzkaller #0 03d350d479d1c05c2ac57b56e0973d7fc75f4bbd
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
 <TASK>
 __dump_stack+0x21/0x30 lib/dump_stack.c:94
 dump_stack_lvl+0x140/0x1c0 lib/dump_stack.c:120
 print_address_description+0x71/0x210 mm/kasan/report.c:377
 print_report+0x4a/0x70 mm/kasan/report.c:481
 kasan_report+0x162/0x1a0 mm/kasan/report.c:594
 check_region_inline mm/kasan/generic.c:-1 [inline]
 kasan_check_range+0x25a/0x2b0 mm/kasan/generic.c:189
 __kasan_check_write+0x18/0x20 mm/kasan/shadow.c:37
 instrument_atomic_read_write include/linux/instrumented.h:96 [inline]
 atomic_fetch_sub_release include/linux/atomic/atomic-instrumented.h:400 [inline]
 __refcount_sub_and_test include/linux/refcount.h:389 [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]
 config_item_put+0x37/0x240 fs/configfs/item.c:149
 configfs_symlink+0x4b5/0x1050 fs/configfs/symlink.c:212
 vfs_symlink+0x3f4/0x620 fs/namei.c:4623
 do_symlinkat+0x1ba/0x400 fs/namei.c:4649
 __do_sys_symlinkat fs/namei.c:4665 [inline]
 __se_sys_symlinkat fs/namei.c:4662 [inline]
 __x64_sys_symlinkat+0x99/0xb0 fs/namei.c:4662
 x64_sys_call+0x1f79/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:267
 do_syscall_x64 arch/x86/entry/common.c:47 [inline]
 do_syscall_64+0x57/0xf0 arch/x86/entry/common.c:78
 entry_SYSCALL_64_after_hwframe+0x76/0x7e
RIP: 0033:0x7f489103f659
Code: c0 79 93 eb d5 48 8d 7c 1d 00 eb 99 0f 1f 44 00 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 d8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff54b1d4b8 EFLAGS: 00000246 ORIG_RAX: 000000000000010a
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f489103f659
RDX: 00002000000002c0 RSI: 00000000ffffff9c RDI: 0000200000000280
RBP: 0000000000000000 R08: 000000000000003d R09: 000000000000003d
R10: 000000000000003d R11: 0000000000000246 R12: 00007fff54b1d4d8
R13: 00007fff54b1d4f0 R14: 00007fff54b1d530 R15: 0000000000000024
 </TASK>

Allocated by task 481:
 kasan_save_stack mm/kasan/common.c:49 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:70
 kasan_save_alloc_info+0x3a/0x50 mm/kasan/generic.c:565
 poison_kmalloc_redzone mm/kasan/common.c:379 [inline]
 __kasan_kmalloc+0x96/0xb0 mm/kasan/common.c:396
 kasan_kmalloc include/linux/kasan.h:261 [inline]
 __kmalloc_cache_noprof+0x23c/0x470 mm/slub.c:4426
 kmalloc_noprof include/linux/slab.h:881 [inline]
 kzalloc_noprof include/linux/slab.h:1017 [inline]
 geth_alloc_inst+0x5e/0x1c0 drivers/usb/gadget/function/f_subset.c:425
 try_get_usb_function_instance drivers/usb/gadget/functions.c:28 [inline]
 usb_get_function_instance+0xfa/0x320 drivers/usb/gadget/functions.c:44
 function_make+0x125/0x370 drivers/usb/gadget/configfs.c:631
 configfs_mkdir+0x526/0xb70 fs/configfs/dir.c:1339
 vfs_mkdir+0x591/0x810 fs/namei.c:4265
 do_mkdirat+0x240/0x530 fs/namei.c:4288
 __do_sys_mkdirat fs/namei.c:4303 [inline]
 __se_sys_mkdirat fs/namei.c:4301 [inline]
 __x64_sys_mkdirat+0x8b/0xa0 fs/namei.c:4301
 x64_sys_call+0x2ba8/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:259
 do_syscall_x64 arch/x86/entry/common.c:47 [inline]
 do_syscall_64+0x57/0xf0 arch/x86/entry/common.c:78
 entry_SYSCALL_64_after_hwframe+0x76/0x7e

Freed by task 481:
 kasan_save_stack mm/kasan/common.c:49 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:70
 kasan_save_free_info+0x44/0x50 mm/kasan/generic.c:579
 poison_slab_object mm/kasan/common.c:249 [inline]
 __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:266
 kasan_slab_free include/linux/kasan.h:234 [inline]
 slab_free_hook mm/slub.c:2445 [inline]
 slab_free mm/slub.c:4714 [inline]
 kfree+0x158/0x440 mm/slub.c:4875
 geth_free_inst+0x9a/0xc0 drivers/usb/gadget/function/f_subset.c:418
 usb_put_function_instance+0x9f/0xc0 drivers/usb/gadget/functions.c:77
 gether_attr_release+0x19/0x30 drivers/usb/gadget/function/f_subset.c:381
 config_item_cleanup fs/configfs/item.c:128 [inline]
 config_item_release fs/configfs/item.c:137 [inline]
 kref_put include/linux/kref.h:65 [inline]
 config_item_put+0x175/0x240 fs/configfs/item.c:149
 configfs_rmdir+0x8e8/0x9b0 fs/configfs/dir.c:1550
 vfs_rmdir+0x3db/0x560 fs/namei.c:4348
 do_rmdir+0x29a/0x590 fs/namei.c:4407
 __do_sys_unlinkat fs/namei.c:4583 [inline]
 __se_sys_unlinkat fs/namei.c:4577 [inline]
 __x64_sys_unlinkat+0xc9/0xf0 fs/namei.c:4577
 x64_sys_call+0x2974/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:264
 do_syscall_x64 arch/x86/entry/common.c:47 [inline]
 do_syscall_64+0x57/0xf0 arch/x86/entry/common.c:78
 entry_SYSCALL_64_after_hwframe+0x76/0x7e

The buggy address belongs to the object at ffff888114b05e00
 which belongs to the cache kmalloc-256 of size 256
The buggy address is located 28 bytes inside of
 freed 256-byte region [ffff888114b05e00, ffff888114b05f00)

The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x114b04
head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x4000000000000040(head|zone=1)
page_type: f5(slab)
raw: 4000000000000040 ffff888100041b40 ffffea000452c080 0000000000000006
raw: 0000000000000000 0000000080100010 00000001f5000000 0000000000000000
head: 4000000000000040 ffff888100041b40 ffffea000452c080 0000000000000006
head: 0000000000000000 0000000080100010 00000001f5000000 0000000000000000
head: 4000000000000001 ffffea000452c101 ffffffffffffffff 0000000000000000
head: 0000000000000002 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 124, tgid 124 (udevadm), ts 5284159252, free_ts 0
 set_page_owner include/linux/page_owner.h:35 [inline]
 post_alloc_hook+0x37d/0x3b0 mm/page_alloc.c:1863
 prep_new_page+0x2d/0x180 mm/page_alloc.c:1871
 get_page_from_freelist+0x4aea/0x4ba0 mm/page_alloc.c:3948
 __alloc_pages_noprof+0x35a/0x7e0 mm/page_alloc.c:5315
 alloc_slab_page+0x6b/0x1e0 mm/slub.c:-1
 allocate_slab+0x69/0x430 mm/slub.c:2687
 new_slab mm/slub.c:2741 [inline]
 ___slab_alloc+0x591/0x8c0 mm/slub.c:3934
 __slab_alloc mm/slub.c:4025 [inline]
 __slab_alloc_node mm/slub.c:4078 [inline]
 slab_alloc_node mm/slub.c:4239 [inline]
 __kmalloc_cache_noprof+0x2cd/0x470 mm/slub.c:4421
 kmalloc_noprof include/linux/slab.h:881 [inline]
 inode_doinit_use_xattr+0x6a/0x550 security/selinux/hooks.c:1375
 inode_doinit_with_dentry+0x9b1/0xde0 security/selinux/hooks.c:1569
 selinux_d_instantiate+0x2b/0x40 security/selinux/hooks.c:6361
 security_d_instantiate+0xb8/0xf0 security/security.c:4068
 d_splice_alias+0x71/0x3a0 fs/dcache.c:2949
 kernfs_iop_lookup+0x2c6/0x320 fs/kernfs/dir.c:1233
 lookup_open fs/namei.c:3581 [inline]
 open_last_lookups fs/namei.c:3702 [inline]
 path_openat+0x1124/0x35a0 fs/namei.c:3938
 do_filp_open+0x1f2/0x440 fs/namei.c:3968
page_owner free stack trace missing

Memory state around the buggy address:
 ffff888114b05d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888114b05d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888114b05e00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                            ^
 ffff888114b05e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888114b05f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
------------[ cut here ]------------
refcount_t: underflow; use-after-free.
WARNING: CPU: 0 PID: 482 at lib/refcount.c:28 refcount_warn_saturate+0x119/0x1c0 lib/refcount.c:28
Modules linked in:
CPU: 0 UID: 0 PID: 482 Comm: syz-executor114 Tainted: G    B   W          syzkaller #0 03d350d479d1c05c2ac57b56e0973d7fc75f4bbd
Tainted: [B]=BAD_PAGE, [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
RIP: 0010:refcount_warn_saturate+0x119/0x1c0 lib/refcount.c:28
Code: 05 01 48 c7 c7 40 f0 51 86 e8 a3 49 55 fe 0f 0b eb da e8 6a 71 d8 fe c6 05 e8 4e 36 05 01 48 c7 c7 a0 f0 51 86 e8 87 49 55 fe <0f> 0b eb be e8 4e 71 d8 fe c6 05 c9 4e 36 05 01 48 c7 c7 e0 ef 51
RSP: 0018:ffffc90001cf7c18 EFLAGS: 00010246
RAX: 92b6b9031cdb8b00 RBX: 0000000000000003 RCX: ffff88810dfdcc00
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000002
RBP: ffffc90001cf7c28 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffffbfff0e9f34c R12: 00000000ffffffea
R13: dffffc0000000000 R14: ffff888114b05e1c R15: 00000000c0000000
FS:  00005555911343c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000056125641eff0 CR3: 00000001150c4000 CR4: 00000000003526b0
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]
 config_item_put+0x230/0x240 fs/configfs/item.c:149
 configfs_symlink+0x4b5/0x1050 fs/configfs/symlink.c:212
 vfs_symlink+0x3f4/0x620 fs/namei.c:4623
 do_symlinkat+0x1ba/0x400 fs/namei.c:4649
 __do_sys_symlinkat fs/namei.c:4665 [inline]
 __se_sys_symlinkat fs/namei.c:4662 [inline]
 __x64_sys_symlinkat+0x99/0xb0 fs/namei.c:4662
 x64_sys_call+0x1f79/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:267
 do_syscall_x64 arch/x86/entry/common.c:47 [inline]
 do_syscall_64+0x57/0xf0 arch/x86/entry/common.c:78
 entry_SYSCALL_64_after_hwframe+0x76/0x7e
RIP: 0033:0x7f489103f659
Code: c0 79 93 eb d5 48 8d 7c 1d 00 eb 99 0f 1f 44 00 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 d8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff54b1d4b8 EFLAGS: 00000246 ORIG_RAX: 000000000000010a
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f489103f659
RDX: 00002000000002c0 RSI: 00000000ffffff9c RDI: 0000200000000280
RBP: 0000000000000000 R08: 000000000000003d R09: 000000000000003d
R10: 000000000000003d R11: 0000000000000246 R12: 00007fff54b1d4d8
R13: 00007fff54b1d4f0 R14: 00007fff54b1d530 R15: 0000000000000024
 </TASK>
---[ end trace 0000000000000000 ]---

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/08/20 02:08 android16-6.12 d47db5b1e129 1e72964b .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust WARNING: refcount bug in config_item_get
2026/08/02 08:17 android16-6.12 1a138e24e292 e611ffe1 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust WARNING: refcount bug in config_item_get
2026/07/29 11:34 android16-6.12 6f69867ef141 19622d9d .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust WARNING: refcount bug in config_item_get
2026/07/28 17:47 android16-6.12 7b9e76cc9df5 edc8a875 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust WARNING: refcount bug in config_item_get
2026/07/28 20:04 android16-6.12 c56681255a47 edc8a875 .config console log report syz / log [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust WARNING: refcount bug in config_item_get
* Struck through repros no longer work on HEAD.