syzbot


assert "to_ticks >= NUM" failed in kern_timeout.c

Status: fixed on 2024/08/06 09:27
Reported-by: syzbot+f650785d4f2b3fe28284@syzkaller.appspotmail.com
Fix commit: 2293e68203ec restrict the maximum wait time you can set via BIOCSWTIMEOUT to 5 minutes.
First crash: 118d, last: 118d

Sample crash report:
panic: kernel diagnostic assertion "to_ticks >= 0" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/kern_timeout.c", line 300
Starting stack trace...
panic(ffffffff830d9281) at panic+0x1d0 sys/kern/subr_prf.c:229
__assert(ffffffff8308d65a,ffffffff8306ecf6,12c,ffffffff82fd87e1) at __assert+0x29
timeout_add(ffff80000121dd28,ffffff43) at timeout_add+0x2f7 sys/kern/kern_timeout.c:300
bpf_catchpacket(ffff80000121dc00,fffffd807ddad400,ef,ffffffff,ffff8000371b1040) at bpf_catchpacket+0x4bf sys/net/bpf.c:1646
_bpf_mtap(ffff80000124f700,fffffd807ddad400,fffffd807ddad400,1) at _bpf_mtap+0x321 sys/net/bpf.c:1416
if_vinput(ffff8000011c4000,fffffd807ddad400) at if_vinput+0xa7 sys/net/if.c:1026
tun_dev_write(5d00,ffff8000371b13d8,ffff800031f4e000,2) at tun_dev_write+0x301 sys/net/if_tun.c:914
spec_write(ffff8000371b1230) at spec_write+0x120 sys/kern/spec_vnops.c:302
VOP_WRITE(fffffd805b606e80,ffff8000371b13d8,11,fffffd807f7d3680) at VOP_WRITE+0x102 sys/kern/vfs_vops.c:245
vn_write(fffffd80681e61e0,ffff8000371b13d8,0) at vn_write+0x1d1 sys/kern/vfs_vnops.c:408
dofilewritev(ffff8000fffed700,c8,ffff8000371b13d8,0,ffff8000371b1490) at dofilewritev+0x23c sys/kern/sys_generic.c:375
sys_write(ffff8000fffed700,ffff8000371b1540,ffff8000371b1490) at sys_write+0xa2 sys/kern/sys_generic.c:295
syscall(ffff8000371b1540) at syscall+0xbb6 mi_syscall sys/sys/syscall_mi.h:179 [inline]
syscall(ffff8000371b1540) at syscall+0xbb6 sys/arch/amd64/amd64/trap.c:577
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7cb4f6472b0, count: 243
End of stack trace.

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/29 10:51 openbsd dd24756f1f82 5187fc86 .config console log report [disk image] [bsd.gdb] [kernel image] ci-openbsd-multicore assert "to_ticks >= NUM" failed in kern_timeout.c
* Struck through repros no longer work on HEAD.