divide error in snd_pcm_lib_ioctl

5 views
Skip to first unread message

syzbot

unread,
Aug 18, 2021, 6:38:20 AM8/18/21
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 59456c9cc40c Linux 4.19.204
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=179fda55300000
kernel config: https://syzkaller.appspot.com/x/.config?x=a84b4514346e13dc
dashboard link: https://syzkaller.appspot.com/bug?extid=830fc34d2fc44efb7ecb
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11336b41300000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=141a757e300000

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

divide error: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 8098 Comm: syz-executor317 Not tainted 4.19.204-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:snd_pcm_lib_ioctl_fifo_size sound/core/pcm_lib.c:1754 [inline]
RIP: 0010:snd_pcm_lib_ioctl+0x450/0x9a0 sound/core/pcm_lib.c:1779
Code: a0 17 fb 4c 89 ea 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 00 05 00 00 49 8b 84 24 18 02 00 00 89 db 31 d2 <48> f7 f3 49 89 84 24 18 02 00 00 45 31 ed e9 de fb ff ff e8 88 a0
RSP: 0018:ffff888092bf7ba8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff864af1bf
RDX: 0000000000000000 RSI: ffffffff864af1c9 RDI: 0000000000000007
RBP: 000000000000000f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000007 R11: 0000000000000000 R12: ffff8880b32b0000
R13: ffff8880b32b0218 R14: 0000000000000000 R15: 0000000000000000
FS: 00000000016c6300(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020001090 CR3: 00000000b507e000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
fixup_unreferenced_params+0x5c5/0x8a0 sound/core/pcm_native.c:496
snd_pcm_hw_refine_old_user sound/core/pcm_native.c:3600 [inline]
snd_pcm_common_ioctl+0x144d/0x29a0 sound/core/pcm_native.c:2948
snd_pcm_ioctl+0x7e/0xb0 sound/core/pcm_native.c:2985
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x443649
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffec06b0638 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000004004a0 RCX: 0000000000443649
RDX: 00000000200010c0 RSI: 00000000c1004110 RDI: 0000000000000003
RBP: 00000000004031f0 R08: 0000000000000000 R09: 00000000004004a0
R10: 000000000000000f R11: 0000000000000246 R12: 0000000000403280
R13: 0000000000000000 R14: 00000000004b1018 R15: 00000000004004a0
Modules linked in:
---[ end trace 272791c8b61acd22 ]---
RIP: 0010:snd_pcm_lib_ioctl_fifo_size sound/core/pcm_lib.c:1754 [inline]
RIP: 0010:snd_pcm_lib_ioctl+0x450/0x9a0 sound/core/pcm_lib.c:1779
Code: a0 17 fb 4c 89 ea 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 00 05 00 00 49 8b 84 24 18 02 00 00 89 db 31 d2 <48> f7 f3 49 89 84 24 18 02 00 00 45 31 ed e9 de fb ff ff e8 88 a0
RSP: 0018:ffff888092bf7ba8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff864af1bf
RDX: 0000000000000000 RSI: ffffffff864af1c9 RDI: 0000000000000007
RBP: 000000000000000f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000007 R11: 0000000000000000 R12: ffff8880b32b0000
R13: ffff8880b32b0218 R14: 0000000000000000 R15: 0000000000000000
FS: 00000000016c6300(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f9c6003a008 CR3: 00000000b507e000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 2 bytes skipped:
0: fb sti
1: 4c 89 ea mov %r13,%rdx
4: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
b: fc ff df
e: 48 c1 ea 03 shr $0x3,%rdx
12: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1)
16: 0f 85 00 05 00 00 jne 0x51c
1c: 49 8b 84 24 18 02 00 mov 0x218(%r12),%rax
23: 00
24: 89 db mov %ebx,%ebx
26: 31 d2 xor %edx,%edx
28: 48 f7 f3 div %rbx <-- trapping instruction
2b: 49 89 84 24 18 02 00 mov %rax,0x218(%r12)
32: 00
33: 45 31 ed xor %r13d,%r13d
36: e9 de fb ff ff jmpq 0xfffffc19
3b: e8 .byte 0xe8
3c: 88 .byte 0x88
3d: a0 .byte 0xa0


---
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.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches
Reply all
Reply to author
Forward
0 new messages