general protection fault, probably for non-canonical address 0xdffffc0000000002: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]
CPU: 0 PID: 3600 Comm: syz-executor728 Not tainted 5.16.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:sg_alloc_append_table_from_pages+0x8a6/0xd00 lib/scatterlist.c:525 lib/scatterlist.c:525
Code: 01 f0 ff ff 0f 83 24 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 3c a6 bc fd 4c 8b 2b 89 eb 4c 8b 74
RSP: 0018:ffffc90001f9fbc0 EFLAGS: 00010202
RAX: 0000000000000002 RBX: 0000000000000010 RCX: ffff888023e9ba00
RDX: dffffc0000000000 RSI: 0000000000000000 RDI: ffff88801ac99da0
RBP: 0000000000001000 R08: dffffc0000000000 R09: ffff88801ac99d80
R10: ffffed10035933b4 R11: 0000000000000000 R12: ffff88801ac99d80
R13: 0000000000000010 R14: 0000000000000001 R15: 0000000000000000
FS:  000055555575f300(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020005b4c CR3: 00000000750e6000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 sg_alloc_table_from_pages_segment+0xb7/0x350 lib/scatterlist.c:573 lib/scatterlist.c:573
 sg_alloc_table_from_pages include/linux/scatterlist.h:331 [inline]
 sg_alloc_table_from_pages include/linux/scatterlist.h:331 [inline] drivers/dma-buf/udmabuf.c:67
 get_sg_table+0xd9/0x150 drivers/dma-buf/udmabuf.c:67 drivers/dma-buf/udmabuf.c:67
 begin_cpu_udmabuf+0xf5/0x160 drivers/dma-buf/udmabuf.c:126 drivers/dma-buf/udmabuf.c:126
 dma_buf_begin_cpu_access+0xd8/0x170 drivers/dma-buf/dma-buf.c:1175 drivers/dma-buf/dma-buf.c:1175
 dma_buf_ioctl+0x26b/0x390 drivers/dma-buf/dma-buf.c:374 drivers/dma-buf/dma-buf.c:374
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 vfs_ioctl fs/ioctl.c:51 [inline] fs/ioctl.c:860
 __do_sys_ioctl fs/ioctl.c:874 [inline] fs/ioctl.c:860
 __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:860 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_x64 arch/x86/entry/common.c:50 [inline] arch/x86/entry/common.c:80
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f2688148069
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:00007ffd87c0c2c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f2688148069
RDX: 0000000020000000 RSI: 0000000040086200 RDI: 0000000000000004
RBP: 00007f268810c050 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f268810c0e0
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>
Modules linked in:
---[ end trace 1ab4586466201c7b ]---
RIP: 0010:sg_alloc_append_table_from_pages+0x8a6/0xd00 lib/scatterlist.c:525 lib/scatterlist.c:525
Code: 01 f0 ff ff 0f 83 24 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 3c a6 bc fd 4c 8b 2b 89 eb 4c 8b 74
RSP: 0018:ffffc90001f9fbc0 EFLAGS: 00010202
RAX: 0000000000000002 RBX: 0000000000000010 RCX: ffff888023e9ba00
RDX: dffffc0000000000 RSI: 0000000000000000 RDI: ffff88801ac99da0
RBP: 0000000000001000 R08: dffffc0000000000 R09: ffff88801ac99d80
R10: ffffed10035933b4 R11: 0000000000000000 R12: ffff88801ac99d80
R13: 0000000000000010 R14: 0000000000000001 R15: 0000000000000000
FS:  000055555575f300(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055bb65729db0 CR3: 00000000750e6000 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 24 02 00          	andl   $0x0,(%rdx,%rax,1)
   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 3c a6 bc fd       	callq  0xfdbca673
  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
----------------
Code disassembly (best guess), 1 bytes skipped:
   0:	f0 ff                	lock (bad)
   2:	ff 0f                	decl   (%rdi)
   4:	83 24 02 00          	andl   $0x0,(%rdx,%rax,1)
   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 3c a6 bc fd       	callq  0xfdbca673
  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