general protection fault, probably for non-canonical address 0xdffffc0000000002: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017] CPU: 1 PID: 5088 Comm: syz-executor.1 Not tainted 5.17.0-rc7-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:sg_alloc_append_table_from_pages+0x896/0xd00 lib/scatterlist.c:525 Code: 01 f0 ff ff 0f 83 41 02 00 00 8b 6c 24 18 48 8b 44 24 70 29 c5 c1 e5 0c 2b 6c 24 14 89 c0 49 8d 5c c5 00 48 89 d8 48 c1 e8 03 <80> 3c 10 00 74 08 48 89 df e8 fc 5d ba fd 4c 8b 2b 89 eb 4c 8b 74 RSP: 0018:ffffc900115efbc0 EFLAGS: 00010202 RAX: 0000000000000002 RBX: 0000000000000010 RCX: 0000000000040000 RDX: dffffc0000000000 RSI: 0000000000000862 RDI: 0000000000000863 RBP: 0000000000001000 R08: dffffc0000000000 R09: ffff88801ad94380 R10: ffffed10035b2874 R11: 0000000000000000 R12: ffff88801ad94380 R13: 0000000000000010 R14: 0000000000000001 R15: 0000000000000000 FS: 00007fa3c3641700(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000c00e837000 CR3: 000000007be6e000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: sg_alloc_table_from_pages_segment+0xb7/0x350 lib/scatterlist.c:573 sg_alloc_table_from_pages include/linux/scatterlist.h:348 [inline] get_sg_table+0xd9/0x150 drivers/dma-buf/udmabuf.c:67 begin_cpu_udmabuf+0xf5/0x160 drivers/dma-buf/udmabuf.c:126 dma_buf_begin_cpu_access+0xd8/0x170 drivers/dma-buf/dma-buf.c:1164 dma_buf_ioctl+0x2a0/0x2f0 drivers/dma-buf/dma-buf.c:363 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7fa3c4ccc049 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fa3c3641168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fa3c4ddef60 RCX: 00007fa3c4ccc049 RDX: 0000000020000000 RSI: 0000000040086200 RDI: 0000000000000004 RBP: 00007fa3c4d2608d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffea989ff8f R14: 00007fa3c3641300 R15: 0000000000022000 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:sg_alloc_append_table_from_pages+0x896/0xd00 lib/scatterlist.c:525 Code: 01 f0 ff ff 0f 83 41 02 00 00 8b 6c 24 18 48 8b 44 24 70 29 c5 c1 e5 0c 2b 6c 24 14 89 c0 49 8d 5c c5 00 48 89 d8 48 c1 e8 03 <80> 3c 10 00 74 08 48 89 df e8 fc 5d ba fd 4c 8b 2b 89 eb 4c 8b 74 RSP: 0018:ffffc900115efbc0 EFLAGS: 00010202 RAX: 0000000000000002 RBX: 0000000000000010 RCX: 0000000000040000 RDX: dffffc0000000000 RSI: 0000000000000862 RDI: 0000000000000863 RBP: 0000000000001000 R08: dffffc0000000000 R09: ffff88801ad94380 R10: ffffed10035b2874 R11: 0000000000000000 R12: ffff88801ad94380 R13: 0000000000000010 R14: 0000000000000001 R15: 0000000000000000 FS: 00007fa3c3641700(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f3cadbbe058 CR3: 000000007be6e000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess), 1 bytes skipped: 0: f0 ff lock (bad) 2: ff 0f decl (%rdi) 4: 83 41 02 00 addl $0x0,0x2(%rcx) 8: 00 8b 6c 24 18 48 add %cl,0x4818246c(%rbx) e: 8b 44 24 70 mov 0x70(%rsp),%eax 12: 29 c5 sub %eax,%ebp 14: c1 e5 0c shl $0xc,%ebp 17: 2b 6c 24 14 sub 0x14(%rsp),%ebp 1b: 89 c0 mov %eax,%eax 1d: 49 8d 5c c5 00 lea 0x0(%r13,%rax,8),%rbx 22: 48 89 d8 mov %rbx,%rax 25: 48 c1 e8 03 shr $0x3,%rax * 29: 80 3c 10 00 cmpb $0x0,(%rax,%rdx,1) <-- trapping instruction 2d: 74 08 je 0x37 2f: 48 89 df mov %rbx,%rdi 32: e8 fc 5d ba fd callq 0xfdba5e33 37: 4c 8b 2b mov (%rbx),%r13 3a: 89 eb mov %ebp,%ebx 3c: 4c rex.WR 3d: 8b .byte 0x8b 3e: 74 .byte 0x74