syzbot


assert "kd_lookup(kd->kd_unit) == NULL" failed in kcov.c (4)

Status: upstream: reported on 2025/09/29 06:33
Reported-by: syzbot+1d63f7ba102fdffd69f3@syzkaller.appspotmail.com
First crash: 16d, last: 16d
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
openbsd assert "kd_lookup(kd->kd_unit) == NULL" failed in kcov.c (3) -1 2 123d 154d 0/3 auto-obsoleted due to no activity on 2025/09/12 14:51
openbsd assert "kd_lookup(kd->kd_unit) == NULL" failed in kcov.c -1 2 352d 389d 0/3 auto-obsoleted due to no activity on 2025/01/26 12:26
openbsd assert "kd_lookup(kd->kd_unit) == NULL" failed in kcov.c (2) -1 1 245d 245d 0/3 auto-obsoleted due to no activity on 2025/05/13 16:49

Sample crash report:
panic: kernel diagnostic assertion "kd_lookup(kd->kd_unit) == NULL" failed: file "/syzkaller/managers/main/kernel/sys/dev/kcov.c", line 306
Stopped at      db_enter+0x25:  addq    $0x8,%rsp
    TID    PID    UID     PRFLAGS     PFLAGS  CPU  COMMAND
*228323  54717      0           0  0x4000000    0  syz-executor
db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438
panic(ffffffff83350277) at panic+0x1cf sys/kern/subr_prf.c:198
__assert(ffffffff8338f698,ffffffff8339b747,132,ffffffff833f40b5) at __assert+0x29 sys/kern/subr_prf.c:-1
kcovopen(113d4,102,2000,ffff80003ca9c2c8) at kcovopen+0x14f kd_lookup sys/dev/kcov.c:478 [inline]
kcovopen(113d4,102,2000,ffff80003ca9c2c8) at kcovopen+0x14f sys/dev/kcov.c:306
spec_open_clone(ffff80003c949478) at spec_open_clone+0x277 sys/kern/spec_vnops.c:722
spec_open(ffff80003c949478) at spec_open+0x316 sys/kern/spec_vnops.c:148
VOP_OPEN(fffffd806bc76cf0,102,fffffd8007bfb7b8,ffff80003ca9c2c8) at VOP_OPEN+0x82 sys/kern/vfs_vops.c:138
vn_open(ffff80003c949620,102,0) at vn_open+0x6a0 sys/kern/vfs_vnops.c:177
sys_ktrace(ffff80003ca9c2c8,ffff80003c9497f0,ffff80003c949740) at sys_ktrace+0x9a sys/kern/kern_ktrace.c:551
syscall(ffff80003c9497f0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline]
syscall(ffff80003c9497f0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:748
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x666ab512d10, count: 4
https://www.openbsd.org/ddb.html describes the minimum info required in bug
reports.  Insufficient info makes it difficult to find and fix bugs.

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/09/29 06:33 openbsd 3abf7a093b78 770ff59f .config console log report [disk image] [bsd.gdb] [kernel image] ci-openbsd-main assert "kd_lookup(kd->kd_unit) == NULL" failed in kcov.c
* Struck through repros no longer work on HEAD.