syzbot


netbsd boot error: assert failed: len <= map->dm_mapsize - offset (2)

Status: fixed on 2023/03/29 14:18
Reported-by: syzbot+7fb1047f5dfa33b26331@syzkaller.appspotmail.com
Fix commit: 31edf7b5b57e virtio(4): Fix sizing of virtqueue allocation.
First crash: 608d, last: 605d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
netbsd netbsd boot error: assert failed: len <= map->dm_mapsize - offset 48 768d 769d 0/3 auto-obsoleted due to no activity on 2022/12/16 12:40
Last patch testing requests (3)
Created Duration User Patch Repo Result
2023/03/29 08:53 28m riastradh@netbsd.org patch https://github.com/NetBSD/src trunk OK
2023/03/29 04:38 24m riastradh@netbsd.org patch https://github.com/NetBSD/src trunk error
2023/03/29 04:31 19m riastradh@netbsd.org https://github.com/NetBSD/src trunk error

Sample crash report:
[   2.5678779] panic: kernel diagnostic assertion "len <= map->dm_mapsize - offset" failed: file "/syzkaller/managers/ci2-netbsd-kmsan/kernel/sys/arch/x86/x86/bus_dma.c", line 832 bad length 0x20004 + 0x4000 > 0x22000
[   2.5678779] cpu0: Begin traceback...
[   2.5678779] vpanic() at netbsd:vpanic+0xc9d
[   2.5678779] kern_assert() at netbsd:kern_assert+0x228
[   2.5678779] bus_dmamap_sync() at netbsd:bus_dmamap_sync+0x1364 _bus_dmamap_sync sys/arch/x86/x86/bus_dma.c:829 [inline]
[   2.5678779] bus_dmamap_sync() at netbsd:bus_dmamap_sync+0x1364 sys/arch/x86/x86/bus_dma.c:1389
[   2.5678779] virtio_enqueue_commit() at netbsd:virtio_enqueue_commit+0xbd6 sys/dev/pci/virtio.c:1159
[   2.5678779] vioscsi_scsipi_request() at netbsd:vioscsi_scsipi_request+0x1f4e sys/dev/pci/vioscsi.c:423
[   2.5678779] scsipi_run_queue() at netbsd:scsipi_run_queue+0x1ef0 scsipi_adapter_request sys/dev/scsipi/scsipi_base.c:2834 [inline]
[   2.5678779] scsipi_run_queue() at netbsd:scsipi_run_queue+0x1ef0 sys/dev/scsipi/scsipi_base.c:2183
[   2.5678779] scsipi_execute_xs() at netbsd:scsipi_execute_xs+0xe8e sys/dev/scsipi/scsipi_base.c:2204
[   2.5678779] scsipi_command() at netbsd:scsipi_command+0x386
[   2.5678779] scsipi_inquire() at netbsd:scsipi_inquire+0x18b sys/dev/scsipi/scsipi_base.c:1221
[   2.5678779] scsi_probe_bus() at netbsd:scsi_probe_bus+0x9dc scsi_report_luns sys/dev/scsipi/scsiconf.c:358 [inline]
[   2.5678779] scsi_probe_bus() at netbsd:scsi_probe_bus+0x9dc scsi_discover_luns sys/dev/scsipi/scsiconf.c:435 [inline]
[   2.5678779] scsi_probe_bus() at netbsd:scsi_probe_bus+0x9dc sys/dev/scsipi/scsiconf.c:494
[   2.5678779] scsibus_config() at netbsd:scsibus_config+0x349 sys/dev/scsipi/scsiconf.c:268
[   2.5678779] scsibus_discover_thread() at netbsd:scsibus_discover_thread+0x28 sys/dev/scsipi/scsiconf.c:234
[   2.5678779] cpu0: End traceback...
[   2.5678779] fatal breakpoint trap in supervisor mode
[   2.5678779] trap type 1 code 0 rip 0xffffffff8023675d cs 0x8 rflags 0x286 cr2 0 ilevel 0x8 rsp 0xfffffe80af079360
[   2.5678779] curlwp 0xfffffe80103f5b00 pid 0.96 lowest kstack 0xfffffe80af0722c0
Stopped in pid 0.96 (system) at netbsd:breakpoint+0x5:  leave
breakpoint() at netbsd:breakpoint+0x5
vpanic() at netbsd:vpanic+0xc9d
kern_assert() at netbsd:kern_assert+0x228
bus_dmamap_sync() at netbsd:bus_dmamap_sync+0x1364 _bus_dmamap_sync sys/arch/x86/x86/bus_dma.c:829 [inline]
bus_dmamap_sync() at netbsd:bus_dmamap_sync+0x1364 sys/arch/x86/x86/bus_dma.c:1389
virtio_enqueue_commit() at netbsd:virtio_enqueue_commit+0xbd6 sys/dev/pci/virtio.c:1159
vioscsi_scsipi_request() at netbsd:vioscsi_scsipi_request+0x1f4e sys/dev/pci/vioscsi.c:423
scsipi_run_queue() at netbsd:scsipi_run_queue+0x1ef0 scsipi_adapter_request sys/dev/scsipi/scsipi_base.c:2834 [inline]
scsipi_run_queue() at netbsd:scsipi_run_queue+0x1ef0 sys/dev/scsipi/scsipi_base.c:2183
scsipi_execute_xs() at netbsd:scsipi_execute_xs+0xe8e sys/dev/scsipi/scsipi_base.c:2204
scsipi_command() at netbsd:scsipi_command+0x386
scsipi_inquire() at netbsd:scsipi_inquire+0x18b sys/dev/scsipi/scsipi_base.c:1221
scsi_probe_bus() at netbsd:scsi_probe_bus+0x9dc scsi_report_luns sys/dev/scsipi/scsiconf.c:358 [inline]
scsi_probe_bus() at netbsd:scsi_probe_bus+0x9dc scsi_discover_luns sys/dev/scsipi/scsiconf.c:435 [inline]
scsi_probe_bus() at netbsd:scsi_probe_bus+0x9dc sys/dev/scsipi/scsiconf.c:494
scsibus_config() at netbsd:scsibus_config+0x349 sys/dev/scsipi/scsiconf.c:268
scsibus_discover_thread() at netbsd:scsibus_discover_thread+0x28 sys/dev/scsipi/scsiconf.c:234
ds          4918
es          8db3
fs          9350
gs          0
rdi         5
rsi         0
rbp         fffffe80af079360
rbx         0
rdx         1
--db_more--

Crashes (135):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/03/29 10:23 netbsd dc4b17131318 f325deb0 .config console log report ci2-netbsd-kmsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/29 01:09 netbsd dc4b17131318 fc067f05 .config console log report ci2-netbsd-kmsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/29 00:36 netbsd dc4b17131318 fc067f05 .config console log report ci2-netbsd netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/28 22:51 netbsd 3b3d0e22aa40 fc067f05 .config console log report ci2-netbsd-kmsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/28 21:47 netbsd 3b3d0e22aa40 fc067f05 .config console log report ci2-netbsd netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/28 20:18 netbsd ea64962370dc fc067f05 .config console log report ci2-netbsd-kmsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/28 19:06 netbsd ea64962370dc fc067f05 .config console log report ci2-netbsd netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/28 18:38 netbsd aedabfa039b1 fc067f05 .config console log report ci2-netbsd-kmsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/28 17:22 netbsd aedabfa039b1 fc067f05 .config console log report ci2-netbsd netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/28 15:34 netbsd aedabfa039b1 47f3aaf1 .config console log report ci2-netbsd-kmsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/28 06:49 netbsd 1183faee5503 47f3aaf1 .config console log report ci2-netbsd netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/28 06:49 netbsd 1183faee5503 47f3aaf1 .config console log report ci2-netbsd netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/28 05:44 netbsd 1183faee5503 47f3aaf1 .config console log report ci2-netbsd-kubsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/28 03:49 netbsd 36581daa3bce 47f3aaf1 .config console log report ci2-netbsd netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/28 02:44 netbsd 36581daa3bce 47f3aaf1 .config console log report ci2-netbsd-kubsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/27 22:27 netbsd eef763987f7f 47f3aaf1 .config console log report ci2-netbsd netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/27 21:20 netbsd eef763987f7f 47f3aaf1 .config console log report ci2-netbsd-kubsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/27 15:44 netbsd eef763987f7f f8f96aa9 .config console log report ci2-netbsd-kubsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/27 14:36 netbsd eef763987f7f f8f96aa9 .config console log report ci2-netbsd netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/27 09:51 netbsd 7ac029eb17bf f8f96aa9 .config console log report ci2-netbsd-kmsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/27 09:51 netbsd 7ac029eb17bf f8f96aa9 .config console log report ci2-netbsd-kmsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/27 09:10 netbsd 7ac029eb17bf f8f96aa9 .config console log report ci2-netbsd-kubsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/27 09:10 netbsd 7ac029eb17bf f8f96aa9 .config console log report ci2-netbsd-kubsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/27 09:10 netbsd 7ac029eb17bf f8f96aa9 .config console log report ci2-netbsd-kubsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/27 00:16 netbsd 7ac029eb17bf fbf0499a .config console log report ci2-netbsd-kubsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/27 00:15 netbsd 7ac029eb17bf fbf0499a .config console log report ci2-netbsd-kubsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/27 00:15 netbsd 7ac029eb17bf fbf0499a .config console log report ci2-netbsd-kubsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/26 23:49 netbsd 7ac029eb17bf fbf0499a .config console log report ci2-netbsd netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/26 23:49 netbsd 7ac029eb17bf fbf0499a .config console log report ci2-netbsd netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/26 23:49 netbsd 7ac029eb17bf fbf0499a .config console log report ci2-netbsd netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/26 23:25 netbsd 7ac029eb17bf fbf0499a .config console log report ci2-netbsd-kmsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/26 23:25 netbsd 7ac029eb17bf fbf0499a .config console log report ci2-netbsd-kmsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/26 23:25 netbsd 7ac029eb17bf fbf0499a .config console log report ci2-netbsd-kmsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/26 21:15 netbsd 16022694865f fbf0499a .config console log report ci2-netbsd-kmsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/26 21:15 netbsd 16022694865f fbf0499a .config console log report ci2-netbsd-kmsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/26 21:15 netbsd 16022694865f fbf0499a .config console log report ci2-netbsd-kmsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/26 20:38 netbsd 16022694865f fbf0499a .config console log report ci2-netbsd-kubsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/26 20:38 netbsd 16022694865f fbf0499a .config console log report ci2-netbsd-kubsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/26 20:38 netbsd 16022694865f fbf0499a .config console log report ci2-netbsd-kubsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/26 20:11 netbsd 16022694865f fbf0499a .config console log report ci2-netbsd netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/26 20:11 netbsd 16022694865f fbf0499a .config console log report ci2-netbsd netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/26 20:10 netbsd 16022694865f fbf0499a .config console log report ci2-netbsd netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/26 18:07 netbsd 3aff9331542e fbf0499a .config console log report ci2-netbsd-kmsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/26 18:07 netbsd 3aff9331542e fbf0499a .config console log report ci2-netbsd-kmsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/26 18:07 netbsd 3aff9331542e fbf0499a .config console log report ci2-netbsd-kmsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
2023/03/26 14:41 netbsd 2db25c8bd775 fbf0499a .config console log report ci2-netbsd-kubsan netbsd boot error: assert failed: len <= map->dm_mapsize - offset
* Struck through repros no longer work on HEAD.