syzbot


netbsd boot error: panic: UBSan: Undefined Behavior in /syzkaller/managers/netbsd-kubsan/kernel/sys/kern/subr_disk_mbr.c:LINE, member acces

Status: fixed on 2019/11/17 08:54
Reported-by: syzbot+56769dece0ec3e35731e@syzkaller.appspotmail.com
Fix commit: 4e5cb50b58af Avoid unaligned pointer arithmetic in check_label_magic()
First crash: 1847d, last: 1842d

Sample crash report:
[   1.3637499] panic: UBSan: Undefined Behavior in /syzkaller/managers/netbsd-kubsan/kernel/sys/kern/subr_disk_mbr.c:574:9, member access within misaligned address 0xffff94be54e8c03c for type 'const struct disklabel' which requires 8 byte alignment

[   1.3807321] cpu0: Begin traceback...
[   1.3833455] vpanic() at netbsd:vpanic+0x2aa sys/kern/subr_prf.c:336
[   1.4013671] isAlreadyReported() at netbsd:isAlreadyReported
[   1.4213878] HandleTypeMismatch.part.1() at netbsd:HandleTypeMismatch.part.1+0xcc
[   1.4313990] HandleTypeMismatch() at netbsd:HandleTypeMismatch+0x7b sys/../common/lib/libc/misc/ubsan.c:408
[   1.4514208] check_label_magic() at netbsd:check_label_magic+0x9f sys/kern/subr_disk_mbr.c:574
[   1.4714414] validate_label() at netbsd:validate_label+0x1b4 sys/kern/subr_disk_mbr.c:626
[   1.4814527] look_netbsd_part() at netbsd:look_netbsd_part+0x3ce sys/kern/subr_disk_mbr.c:526
[   1.5014734] scan_mbr() at netbsd:scan_mbr+0x24a sys/kern/subr_disk_mbr.c:234
[   1.5115628] readdisklabel() at netbsd:readdisklabel+0x412 sys/kern/subr_disk_mbr.c:448
[   1.5315175] dk_getdisklabel() at netbsd:dk_getdisklabel+0x192 sys/dev/dksubr.c:931
[   1.5515274] dk_open() at netbsd:dk_open+0x456 sys/dev/dksubr.c:177
[   1.5615377] sdopen() at netbsd:sdopen+0x114 sys/dev/scsipi/sd.c:543
[   1.5815581] cdev_open() at netbsd:cdev_open+0xfb sys/kern/subr_devsw.c:871
[   1.5915690] spec_open() at netbsd:spec_open+0x3ad sys/miscfs/specfs/spec_vnops.c:562
[   1.6115897] VOP_OPEN() at netbsd:VOP_OPEN+0x113 sys/kern/vnode_if.c:298
[   1.6216006] dkwedge_discover() at netbsd:dkwedge_discover+0xcf sys/dev/dkwedge/dk.c:931
[   1.6416221] sdattach() at netbsd:sdattach+0x53f sys/dev/scsipi/sd.c:362
[   1.6616425] config_attach_loc() at netbsd:config_attach_loc+0x432 sys/kern/subr_autoconf.c:1604
[   1.6716541] scsi_probe_bus() at netbsd:scsi_probe_bus+0xc76 scsi_probe_device sys/dev/scsipi/scsiconf.c:1043 [inline]
[   1.6716541] scsi_probe_bus() at netbsd:scsi_probe_bus+0xc76 sys/dev/scsipi/scsiconf.c:413
[   1.6916758] scsibus_discover_thread() at netbsd:scsibus_discover_thread+0x100 scsibus_config sys/dev/scsipi/scsiconf.c:320 [inline]
[   1.6916758] scsibus_discover_thread() at netbsd:scsibus_discover_thread+0x100 sys/dev/scsipi/scsiconf.c:285
[   1.6916758] cpu0: End traceback...
[   1.7034812] fatal breakpoint trap in supervisor mode
[   1.7034812] trap type 1 code 0 rip 0xffffffff8021dddd cs 0x8 rflags 0x282 cr2 0 ilevel 0 rsp 0xffffc700a5c10260
[   1.7139986] curlwp 0xffff94bd42cdc9c0 pid 0.28 lowest kstack 0xffffc700a5c0d2c0
Stopped in pid 0.28 (system) at netbsd:breakpoint+0x5:  leave
db{0}> 

Crashes (135):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/11/06 14:25 netbsd e2f0e81a2789 bc2c6e45 .config console log report ci2-netbsd-kubsan
2019/11/06 12:55 netbsd c61c0ff71590 bc2c6e45 .config console log report ci2-netbsd-kubsan
2019/11/06 10:46 netbsd fcf817720f84 bc2c6e45 .config console log report ci2-netbsd-kubsan
2019/11/06 08:55 netbsd f0c83b012b50 bc2c6e45 .config console log report ci2-netbsd-kubsan
2019/11/06 06:25 netbsd 150d7fedb76c bc2c6e45 .config console log report ci2-netbsd-kubsan
2019/11/06 02:04 netbsd 21610270b770 af5c522d .config console log report ci2-netbsd-kubsan
2019/11/06 00:33 netbsd 5999efbd4a30 af5c522d .config console log report ci2-netbsd-kubsan
2019/11/05 22:24 netbsd 33bcae20fd7c af5c522d .config console log report ci2-netbsd-kubsan
2019/11/05 16:12 netbsd 711d73f84b25 af5c522d .config console log report ci2-netbsd-kubsan
2019/11/05 14:37 netbsd 4c598cdc6b2a af5c522d .config console log report ci2-netbsd-kubsan
2019/11/05 14:37 netbsd 4c598cdc6b2a af5c522d .config console log report ci2-netbsd-kubsan
2019/11/05 12:27 netbsd 97687d1104fc 0f3ec414 .config console log report ci2-netbsd-kubsan
2019/11/05 06:18 netbsd 95be46a176a9 76630fc9 .config console log report ci2-netbsd-kubsan
2019/11/05 00:23 netbsd d0a921948f88 76630fc9 .config console log report ci2-netbsd-kubsan
2019/11/04 17:15 netbsd d0a921948f88 18e12644 .config console log report ci2-netbsd-kubsan
2019/11/04 15:06 netbsd a1dc8cc9ac72 18e12644 .config console log report ci2-netbsd-kubsan
2019/11/04 12:15 netbsd 61b97089022e 18e12644 .config console log report ci2-netbsd-kubsan
2019/11/04 11:21 netbsd 61b97089022e b35fad31 .config console log report ci2-netbsd-kubsan
2019/11/04 07:51 netbsd 973bd4636e4b b35fad31 .config console log report ci2-netbsd-kubsan
2019/11/04 03:20 netbsd 95d1739f23de b35fad31 .config console log report ci2-netbsd-kubsan
2019/11/04 01:11 netbsd f450d4ae3e39 b35fad31 .config console log report ci2-netbsd-kubsan
2019/11/03 21:40 netbsd b41253c2ec16 b35fad31 .config console log report ci2-netbsd-kubsan
2019/11/03 15:47 netbsd b41253c2ec16 c9610487 .config console log report ci2-netbsd-kubsan
2019/11/03 13:56 netbsd c8e8ba6900dd c9610487 .config console log report ci2-netbsd-kubsan
2019/11/03 11:47 netbsd 81074d35bbd9 c9610487 .config console log report ci2-netbsd-kubsan
2019/11/03 09:17 netbsd ee05abd05caa d603afc9 .config console log report ci2-netbsd-kubsan
2019/11/03 05:26 netbsd 127b46e4fe32 d603afc9 .config console log report ci2-netbsd-kubsan
2019/11/03 03:57 netbsd 062c586a37ed d603afc9 .config console log report ci2-netbsd-kubsan
2019/11/03 01:46 netbsd 7a34cf37bf0e d603afc9 .config console log report ci2-netbsd-kubsan
2019/11/03 01:46 netbsd 7a34cf37bf0e d603afc9 .config console log report ci2-netbsd-kubsan
2019/11/03 00:17 netbsd 4cfa2c0ac6d2 d603afc9 .config console log report ci2-netbsd-kubsan
2019/11/03 00:17 netbsd 4cfa2c0ac6d2 d603afc9 .config console log report ci2-netbsd-kubsan
2019/11/03 00:17 netbsd 4cfa2c0ac6d2 d603afc9 .config console log report ci2-netbsd-kubsan
2019/11/02 22:26 netbsd c66a833d5c99 d603afc9 .config console log report ci2-netbsd-kubsan
2019/11/02 22:26 netbsd c66a833d5c99 d603afc9 .config console log report ci2-netbsd-kubsan
2019/11/02 22:26 netbsd c66a833d5c99 d603afc9 .config console log report ci2-netbsd-kubsan
2019/11/02 21:30 netbsd d321a21ac13a d603afc9 .config console log report ci2-netbsd-kubsan
2019/11/02 21:30 netbsd d321a21ac13a d603afc9 .config console log report ci2-netbsd-kubsan
2019/11/02 21:30 netbsd d321a21ac13a d603afc9 .config console log report ci2-netbsd-kubsan
2019/11/02 20:41 netbsd d321a21ac13a 997ccc67 .config console log report ci2-netbsd-kubsan
2019/11/02 20:41 netbsd d321a21ac13a 997ccc67 .config console log report ci2-netbsd-kubsan
2019/11/02 20:41 netbsd d321a21ac13a 997ccc67 .config console log report ci2-netbsd-kubsan
2019/11/02 18:51 netbsd 27a540f22e46 997ccc67 .config console log report ci2-netbsd-kubsan
2019/11/02 18:51 netbsd 27a540f22e46 997ccc67 .config console log report ci2-netbsd-kubsan
2019/11/01 17:57 netbsd b177c0eef765 a41ca8fa .config console log report ci2-netbsd-kubsan
* Struck through repros no longer work on HEAD.