[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <67836501.050a0220.216c54.002c.GAE@google.com>
Date: Sat, 11 Jan 2025 22:45:21 -0800
From: syzbot <syzbot+85992ace37d5b7b51635@...kaller.appspotmail.com>
To: iommu@...ts.linux.dev, jgg@...dia.com, jgg@...pe.ca,
joao.m.martins@...cle.com, joro@...tes.org, kevin.tian@...el.com,
linux-kernel@...r.kernel.org, robin.murphy@....com,
syzkaller-bugs@...glegroups.com, will@...nel.org
Subject: [syzbot] [iommu?] UBSAN: shift-out-of-bounds in iova_bitmap_alloc
Hello,
syzbot found the following issue on:
HEAD commit: 09a0fa92e5b4 Merge tag 'selinux-pr-20250107' of git://git...
git tree: upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=16e35b0f980000
kernel config: https://syzkaller.appspot.com/x/.config?x=4ef22c4fce5135b4
dashboard link: https://syzkaller.appspot.com/bug?extid=85992ace37d5b7b51635
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=121fbedf980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=159e8ef8580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/c59c19cd5728/disk-09a0fa92.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/27a8ecc530b5/vmlinux-09a0fa92.xz
kernel image: https://storage.googleapis.com/syzbot-assets/6ed4573ed205/bzImage-09a0fa92.xz
The issue was bisected to:
commit 266ce58989ba05e2a24460fdbf402d766c2e3870
Author: Joao Martins <joao.m.martins@...cle.com>
Date: Tue Oct 24 13:51:05 2023 +0000
iommufd/selftest: Test IOMMU_HWPT_ALLOC_DIRTY_TRACKING
bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=11f3b218580000
final oops: https://syzkaller.appspot.com/x/report.txt?x=13f3b218580000
console output: https://syzkaller.appspot.com/x/log.txt?x=15f3b218580000
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+85992ace37d5b7b51635@...kaller.appspotmail.com
Fixes: 266ce58989ba ("iommufd/selftest: Test IOMMU_HWPT_ALLOC_DIRTY_TRACKING")
iommufd_mock iommufd_mock0: Adding to iommu group 0
------------[ cut here ]------------
UBSAN: shift-out-of-bounds in drivers/iommu/iommufd/iova_bitmap.c:133:27
shift exponent 63 is too large for 32-bit type 'int'
CPU: 1 UID: 0 PID: 5829 Comm: syz-executor365 Not tainted 6.13.0-rc6-syzkaller-00038-g09a0fa92e5b4 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
ubsan_epilogue lib/ubsan.c:231 [inline]
__ubsan_handle_shift_out_of_bounds+0x3c8/0x420 lib/ubsan.c:468
iova_bitmap_offset_to_index drivers/iommu/iommufd/iova_bitmap.c:133 [inline]
iova_bitmap_alloc+0x2bd/0x2d0 drivers/iommu/iommufd/iova_bitmap.c:259
iommu_read_and_clear_dirty drivers/iommu/iommufd/io_pagetable.c:534 [inline]
iopt_read_and_clear_dirty_data+0x35a/0x6c0 drivers/iommu/iommufd/io_pagetable.c:594
iommufd_hwpt_get_dirty_bitmap+0x17c/0x2e0 drivers/iommu/iommufd/hw_pagetable.c:470
iommufd_fops_ioctl+0x4d6/0x5a0 drivers/iommu/iommufd/main.c:409
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:906 [inline]
__se_sys_ioctl+0xf5/0x170 fs/ioctl.c:892
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fa2fda974a9
Code: 48 83 c4 28 c3 e8 37 17 00 00 0f 1f 80 00 00 00 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc593f2558 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ffc593f2728 RCX: 00007fa2fda974a9
RDX: 0000000020000300 RSI: 0000000000003b8c RDI: 0000000000000003
RBP: 00007fa2fdb0a610 R08: 00007ffc593f2728 R09: 00007ffc593f2728
R10: 00007ffc593f2728 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffc593f2718 R14: 0000000000000001 R15: 0000000000000001
</TASK>
---[ end trace ]---
---
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 syzkaller@...glegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
For information about bisection process see: https://goo.gl/tpsmEJ#bisection
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
Powered by blists - more mailing lists