[syzbot] [iommu?] KMSAN: uninit-value in iopt_pages_unfill_xarray

1 view
Skip to first unread message

syzbot

unread,
Jan 25, 2026, 1:02:30 AM (yesterday) Jan 25
to io...@lists.linux.dev, j...@ziepe.ca, jo...@8bytes.org, kevin...@intel.com, linux-...@vger.kernel.org, robin....@arm.com, syzkall...@googlegroups.com, wi...@kernel.org
Hello,

syzbot found the following issue on:

HEAD commit: 6c790212c588 Merge tag 'devicetree-fixes-for-6.19-3' of gi..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=113ef852580000
kernel config: https://syzkaller.appspot.com/x/.config?x=8bf02b9e495b9fcd
dashboard link: https://syzkaller.appspot.com/bug?extid=a0c841e02f328005bbcc
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1796579a580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13919d22580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/913c7571d705/disk-6c790212.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/62003bdb5d84/vmlinux-6c790212.xz
kernel image: https://storage.googleapis.com/syzbot-assets/5fd53ea608c6/bzImage-6c790212.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+a0c841...@syzkaller.appspotmail.com

=====================================================
BUG: KMSAN: uninit-value in batch_add_pfn_num drivers/iommu/iommufd/pages.c:365 [inline]
BUG: KMSAN: uninit-value in batch_add_pfn drivers/iommu/iommufd/pages.c:398 [inline]
BUG: KMSAN: uninit-value in batch_from_xarray_clear drivers/iommu/iommufd/pages.c:590 [inline]
BUG: KMSAN: uninit-value in iopt_pages_unpin_xarray drivers/iommu/iommufd/pages.c:2030 [inline]
BUG: KMSAN: uninit-value in iopt_pages_unfill_xarray+0xfe3/0x1660 drivers/iommu/iommufd/pages.c:2068
batch_add_pfn_num drivers/iommu/iommufd/pages.c:365 [inline]
batch_add_pfn drivers/iommu/iommufd/pages.c:398 [inline]
batch_from_xarray_clear drivers/iommu/iommufd/pages.c:590 [inline]
iopt_pages_unpin_xarray drivers/iommu/iommufd/pages.c:2030 [inline]
iopt_pages_unfill_xarray+0xfe3/0x1660 drivers/iommu/iommufd/pages.c:2068
iopt_area_remove_access+0x508/0x650 drivers/iommu/iommufd/pages.c:2516
iommufd_access_unpin_pages+0x637/0xa50 drivers/iommu/iommufd/device.c:1358
iommufd_test_access_unmap+0x423/0x6b0 drivers/iommu/iommufd/selftest.c:1384
iommufd_test_staccess_release+0x7f/0x140 drivers/iommu/iommufd/selftest.c:1425
__fput+0x60e/0x1050 fs/file_table.c:468
____fput+0x25/0x30 fs/file_table.c:496
task_work_run+0x208/0x2b0 kernel/task_work.c:233
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
__exit_to_user_mode_loop kernel/entry/common.c:44 [inline]
exit_to_user_mode_loop+0x2ff/0x1b20 kernel/entry/common.c:75
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline]
syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:159 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:194 [inline]
do_syscall_64+0x1d7/0xf80 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f

Local variable batch created at:
iopt_pages_unfill_xarray+0x86/0x1660 drivers/iommu/iommufd/pages.c:2053
iopt_area_remove_access+0x508/0x650 drivers/iommu/iommufd/pages.c:2516

CPU: 0 UID: 0 PID: 6001 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(voluntary)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/13/2026
=====================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

Edward Adam Davis

unread,
Jan 25, 2026, 9:29:28 PM (4 hours ago) Jan 25
to syzbot+a0c841...@syzkaller.appspotmail.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
#syz test

diff --git a/drivers/iommu/iommufd/pages.c b/drivers/iommu/iommufd/pages.c
index dbe51ecb9a20..f606148920fa 100644
--- a/drivers/iommu/iommufd/pages.c
+++ b/drivers/iommu/iommufd/pages.c
@@ -289,6 +289,7 @@ static void batch_clear(struct pfn_batch *batch)
batch->end = 0;
batch->pfns[0] = 0;
batch->npfns[0] = 0;
+ batch->kind = 0;
}

/*

syzbot

unread,
Jan 25, 2026, 10:10:08 PM (3 hours ago) Jan 25
to ead...@qq.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-by: syzbot+a0c841...@syzkaller.appspotmail.com
Tested-by: syzbot+a0c841...@syzkaller.appspotmail.com

Tested on:

commit: 63804fed Linux 6.19-rc7
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=172211b2580000
kernel config: https://syzkaller.appspot.com/x/.config?x=8bf02b9e495b9fcd
dashboard link: https://syzkaller.appspot.com/bug?extid=a0c841e02f328005bbcc
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
patch: https://syzkaller.appspot.com/x/patch.diff?x=1302205a580000

Note: testing is done by a robot and is best-effort only.
Reply all
Reply to author
Forward
0 new messages