syzbot


WARNING: refcount bug in call_timer_fn

Status: upstream: reported on 2025/12/29 16:57
Reported-by: syzbot+e4d23cb9d6601fbb7335@syzkaller.appspotmail.com
First crash: 17d, last: 17d
Similar bugs (5)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING: refcount bug in call_timer_fn net 13 1 1503d 1503d 0/29 closed as invalid on 2022/01/07 18:56
upstream WARNING: refcount bug in call_timer_fn (3) fs 13 1 434d 430d 0/29 auto-obsoleted due to no activity on 2025/02/05 18:30
upstream WARNING: refcount bug in call_timer_fn (2) acpi 13 1 528d 524d 0/29 auto-obsoleted due to no activity on 2024/11/03 21:47
upstream WARNING: refcount bug in call_timer_fn (4) trace fs perf 13 10 27d 331d 0/29 moderation: reported on 2025/02/19 09:54
linux-6.1 WARNING: refcount bug in call_timer_fn 13 1 685d 685d 0/3 auto-obsoleted due to no activity on 2024/06/09 18:08

Sample crash report:
------------[ cut here ]------------
refcount_t: underflow; use-after-free.
WARNING: CPU: 1 PID: 6242 at lib/refcount.c:28 refcount_warn_saturate+0x10f/0x1b0 lib/refcount.c:28
Modules linked in:
CPU: 1 PID: 6242 Comm: syz.3.93 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
RIP: 0010:refcount_warn_saturate+0x10f/0x1b0 lib/refcount.c:28
Code: 0a 01 48 c7 c7 40 17 fc 8a e8 5d d7 30 fd 0f 0b eb e0 e8 24 5b 66 fd c6 05 60 92 15 0a 01 48 c7 c7 a0 17 fc 8a e8 41 d7 30 fd <0f> 0b eb c4 e8 08 5b 66 fd c6 05 41 92 15 0a 01 48 c7 c7 e0 16 fc
RSP: 0018:ffffc900001f0ba8 EFLAGS: 00010246
RAX: 29c326b2ad70ae00 RBX: 0000000000000003 RCX: ffff88807bd31e00
RDX: 0000000000000100 RSI: 0000000000000000 RDI: 0000000000000002
RBP: ffffc900001f0cb0 R08: ffffc900001f07a7 R09: 1ffff9200003e0f4
R10: dffffc0000000000 R11: fffff5200003e0f5 R12: 1ffff9200003e17c
R13: ffff88807e39e1b8 R14: ffff88807e39e020 R15: 0000000000000001
FS:  00007f1fc99f66c0(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055d70165ea38 CR3: 000000002ed1f000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600
Call Trace:
 <IRQ>
 call_timer_fn+0x16e/0x530 kernel/time/timer.c:1701
 expire_timers kernel/time/timer.c:1752 [inline]
 __run_timers+0x52d/0x7d0 kernel/time/timer.c:2023
 run_timer_softirq+0x67/0xf0 kernel/time/timer.c:2036
 handle_softirqs+0x280/0x820 kernel/softirq.c:578
 __do_softirq kernel/softirq.c:612 [inline]
 invoke_softirq kernel/softirq.c:452 [inline]
 __irq_exit_rcu+0xc7/0x190 kernel/softirq.c:661
 irq_exit_rcu+0x9/0x20 kernel/softirq.c:673
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1088 [inline]
 sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1088
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:687
RIP: 0010:preempt_schedule_irq+0xb0/0x140 kernel/sched/core.c:7009
Code: 44 24 20 f6 44 24 21 02 74 0b 0f 0b 48 f7 03 08 00 00 00 74 63 bf 01 00 00 00 e8 8b b3 eb f6 e8 26 3a 1c f7 fb bf 01 00 00 00 <e8> db b5 ff ff 48 c7 44 24 40 00 00 00 00 9c 8f 44 24 40 8b 44 24
RSP: 0018:ffffc9000cd273c0 EFLAGS: 00000282
RAX: 29c326b2ad70ae00 RBX: 0000000000000000 RCX: 29c326b2ad70ae00
RDX: dffffc0000000000 RSI: ffffffff8aaabce0 RDI: 0000000000000001
RBP: ffffc9000cd27470 R08: ffffffff90d9452f R09: 1ffffffff21b28a5
R10: dffffc0000000000 R11: fffffbfff21b28a6 R12: 0000000000000000
R13: 0000000000000000 R14: dffffc0000000000 R15: 1ffff920019a4e78
 irqentry_exit+0x67/0x70 kernel/entry/common.c:438
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:687
RIP: 0010:mod_node_page_state+0x0/0x10 mm/vmstat.c:666
Code: 49 89 ff 48 c7 c7 80 f1 de 8c 4c 89 f6 e8 b8 3a 91 02 4c 89 ff eb c5 4c 89 f7 48 c7 c6 40 07 b4 8a e8 d4 9a 04 00 0f 0b 66 90 <f3> 0f 1e fa 31 c9 eb 08 0f 1f 84 00 00 00 00 00 55 41 57 41 56 41
RSP: 0018:ffffc9000cd27538 EFLAGS: 00000206
RAX: 0000000000000000 RBX: ffffea0000ad7040 RCX: 0000000000000000
RDX: fffffffffffff000 RSI: 0000000000000006 RDI: ffff88813fffa000
RBP: 0000000000000000 R08: ffffffff90d9452f R09: 1ffffffff21b28a5
R10: dffffc0000000000 R11: fffffbfff21b28a6 R12: 0000000080240000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 unaccount_slab mm/slab.h:653 [inline]
 __free_slab+0x111/0x270 mm/slub.c:2097
 discard_slab mm/slub.c:2127 [inline]
 __unfreeze_partials+0x1cf/0x210 mm/slub.c:2667
 put_cpu_partial+0x17c/0x250 mm/slub.c:2743
 __slab_free+0x31d/0x410 mm/slub.c:3700
 qlink_free mm/kasan/quarantine.c:166 [inline]
 qlist_free_all+0x75/0xe0 mm/kasan/quarantine.c:185
 kasan_quarantine_reduce+0x143/0x160 mm/kasan/quarantine.c:292
 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:305
 kasan_slab_alloc include/linux/kasan.h:188 [inline]
 slab_post_alloc_hook+0x6e/0x4d0 mm/slab.h:767
 slab_alloc_node mm/slub.c:3495 [inline]
 __kmem_cache_alloc_node+0x13e/0x260 mm/slub.c:3534
 kmalloc_node_trace+0x26/0xe0 mm/slab_common.c:1111
 kmalloc_node include/linux/slab.h:616 [inline]
 kzalloc_node include/linux/slab.h:732 [inline]
 __get_vm_area_node+0x125/0x370 mm/vmalloc.c:2613
 __vmalloc_node_range+0x36e/0x1320 mm/vmalloc.c:3299
 __vmalloc_node mm/vmalloc.c:3404 [inline]
 vmalloc+0x79/0x90 mm/vmalloc.c:3437
 netlink_alloc_large_skb net/netlink/af_netlink.c:1189 [inline]
 netlink_sendmsg+0x5f3/0xbe0 net/netlink/af_netlink.c:1869
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg net/socket.c:745 [inline]
 sock_write_iter+0x2bb/0x3f0 net/socket.c:1160
 call_write_iter include/linux/fs.h:2018 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x43b/0x940 fs/read_write.c:584
 ksys_write+0x147/0x250 fs/read_write.c:637
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f1fcb78f749
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:00007f1fc99f6038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f1fcb9e6090 RCX: 00007f1fcb78f749
RDX: 000000000000fe33 RSI: 0000200000000040 RDI: 0000000000000009
RBP: 00007f1fcb813f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f1fcb9e6128 R14: 00007f1fcb9e6090 R15: 00007ffef0e5fb28
 </TASK>
----------------
Code disassembly (best guess):
   0:	44 24 20             	rex.R and $0x20,%al
   3:	f6 44 24 21 02       	testb  $0x2,0x21(%rsp)
   8:	74 0b                	je     0x15
   a:	0f 0b                	ud2
   c:	48 f7 03 08 00 00 00 	testq  $0x8,(%rbx)
  13:	74 63                	je     0x78
  15:	bf 01 00 00 00       	mov    $0x1,%edi
  1a:	e8 8b b3 eb f6       	call   0xf6ebb3aa
  1f:	e8 26 3a 1c f7       	call   0xf71c3a4a
  24:	fb                   	sti
  25:	bf 01 00 00 00       	mov    $0x1,%edi
* 2a:	e8 db b5 ff ff       	call   0xffffb60a <-- trapping instruction
  2f:	48 c7 44 24 40 00 00 	movq   $0x0,0x40(%rsp)
  36:	00 00
  38:	9c                   	pushf
  39:	8f 44 24 40          	pop    0x40(%rsp)
  3d:	8b                   	.byte 0x8b
  3e:	44                   	rex.R
  3f:	24                   	.byte 0x24

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/12/29 16:56 linux-6.6.y 5fa4793a2d2d d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan-perf WARNING: refcount bug in call_timer_fn
* Struck through repros no longer work on HEAD.