syzbot


kernel BUG in iommu_pages_start_incoherent

Status: fixed on 2026/01/21 09:45
Subsystems: iommu
[Documentation on labels]
Reported-by: syzbot+e06bb7478e687f235ad7@syzkaller.appspotmail.com
Fix commit: 7a089c5d35aa iommupt: Return ERR_PTR from _table_alloc()
First crash: 53d, last: 39d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [iommu?] kernel BUG in iommu_pages_start_incoherent 2 (3) 2025/12/12 06:47

Sample crash report:
R13: 00007f5f1b5e6038 R14: 00007f5f1b5e5fa0 R15: 00007fffbf06b838
 </TASK>
------------[ cut here ]------------
kernel BUG at arch/x86/mm/physaddr.c:28!
Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
CPU: 2 UID: 0 PID: 9405 Comm: syz.1.1063 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
RIP: 0010:__phys_addr+0xfa/0x180 arch/x86/mm/physaddr.c:28
Code: 48 d3 e8 48 89 c3 48 89 c6 e8 02 4b 50 00 48 85 db 75 11 e8 28 50 50 00 48 89 e8 5b 5d 41 5c c3 cc cc cc cc e8 17 50 50 00 90 <0f> 0b e8 0f 50 50 00 48 c7 c0 10 f0 1a 8e 48 ba 00 00 00 00 00 fc
RSP: 0018:ffffc9000373f1a0 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000080000000 RCX: ffffffff816e95f3
RDX: ffff888061308000 RSI: ffffffff816e9679 RDI: 0000000000000006
RBP: 0000778000000000 R08: 0000000000000006 R09: 0000000080000000
R10: 0000778000000000 R11: ffff888061308b30 R12: 0000000000000000
R13: 0000000000000001 R14: ffffc9000373f610 R15: 1ffff920006e7e45
FS:  00007f5f1c1bd6c0(0000) GS:ffff8880d6af5000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2f263fff CR3: 000000005895e000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 virt_to_folio include/linux/mm.h:1432 [inline]
 virt_to_ioptdesc drivers/iommu/iommu-pages.h:49 [inline]
 iommu_pages_start_incoherent+0x1c/0x320 drivers/iommu/iommu-pages.c:148
 _table_alloc drivers/iommu/generic_pt/iommu_pt.h:377 [inline]
 table_alloc drivers/iommu/generic_pt/iommu_pt.h:408 [inline]
 pt_iommu_new_table drivers/iommu/generic_pt/iommu_pt.h:424 [inline]
 __map_range+0x550/0xa30 drivers/iommu/generic_pt/iommu_pt.h:584
 pt_descend drivers/iommu/generic_pt/pt_iter.h:391 [inline]
 __map_range+0x28e/0xa30 drivers/iommu/generic_pt/iommu_pt.h:619
 pt_descend drivers/iommu/generic_pt/pt_iter.h:391 [inline]
 __map_range+0x28e/0xa30 drivers/iommu/generic_pt/iommu_pt.h:619
 pt_walk_range drivers/iommu/generic_pt/pt_iter.h:408 [inline]
 do_map drivers/iommu/generic_pt/iommu_pt.h:813 [inline]
 pt_iommu_vtdss_map_pages+0x6f3/0xf50 drivers/iommu/generic_pt/iommu_pt.h:905
 iommu_map_nosync+0x33a/0x720 drivers/iommu/iommu.c:2549
 iommu_map_sg+0x1c1/0x9d0 drivers/iommu/iommu.c:2721
 iommu_dma_map_sg+0xb30/0x12b0 drivers/iommu/dma-iommu.c:1493
 __dma_map_sg_attrs+0x269/0x540 kernel/dma/mapping.c:245
 dma_map_sgtable+0x78/0x100 kernel/dma/mapping.c:323
 drm_gem_map_dma_buf+0x12f/0x1f0 drivers/gpu/drm/drm_prime.c:683
 dma_buf_map_attachment+0x161/0x5f0 drivers/dma-buf/dma-buf.c:1118
 dma_buf_map_attachment_unlocked+0x9e/0x150 drivers/dma-buf/dma-buf.c:1188
 drm_gem_prime_import_dev drivers/gpu/drm/drm_prime.c:996 [inline]
 drm_gem_prime_import_dev+0x166/0x420 drivers/gpu/drm/drm_prime.c:968
 virtgpu_gem_prime_import+0x16c/0x7e0 drivers/gpu/drm/virtio/virtgpu_prime.c:316
 drm_gem_prime_fd_to_handle+0x1a9/0x5c0 drivers/gpu/drm/drm_prime.c:314
 drm_prime_fd_to_handle_ioctl+0xd6/0x110 drivers/gpu/drm/drm_prime.c:372
 drm_ioctl_kernel+0x1f4/0x3e0 drivers/gpu/drm/drm_ioctl.c:804
 drm_ioctl+0x5c9/0xc30 drivers/gpu/drm/drm_ioctl.c:901
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl fs/ioctl.c:583 [inline]
 __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xcd/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f5f1b38f7c9
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:00007f5f1c1bd038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f5f1b5e5fa0 RCX: 00007f5f1b38f7c9
RDX: 0000200000000180 RSI: 00000000c00c642e RDI: 0000000000000003
RBP: 00007f5f1c1bd090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002
R13: 00007f5f1b5e6038 R14: 00007f5f1b5e5fa0 R15: 00007fffbf06b838
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__phys_addr+0xfa/0x180 arch/x86/mm/physaddr.c:28
Code: 48 d3 e8 48 89 c3 48 89 c6 e8 02 4b 50 00 48 85 db 75 11 e8 28 50 50 00 48 89 e8 5b 5d 41 5c c3 cc cc cc cc e8 17 50 50 00 90 <0f> 0b e8 0f 50 50 00 48 c7 c0 10 f0 1a 8e 48 ba 00 00 00 00 00 fc
RSP: 0018:ffffc9000373f1a0 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000080000000 RCX: ffffffff816e95f3
RDX: ffff888061308000 RSI: ffffffff816e9679 RDI: 0000000000000006
RBP: 0000778000000000 R08: 0000000000000006 R09: 0000000080000000
R10: 0000778000000000 R11: ffff888061308b30 R12: 0000000000000000
R13: 0000000000000001 R14: ffffc9000373f610 R15: 1ffff920006e7e45
FS:  00007f5f1c1bd6c0(0000) GS:ffff8880d6af5000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2f263fff CR3: 000000005895e000 CR4: 0000000000352ef0

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/12/20 19:56 upstream d8ba32c5a460 d1b870e1 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in iommu_pages_start_incoherent
2025/12/19 15:33 upstream dd9b004b7ff3 d1b870e1 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in iommu_pages_start_incoherent
2025/12/07 03:22 upstream c06c303832ec d1b870e1 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in iommu_pages_start_incoherent
* Struck through repros no longer work on HEAD.