================================================================== BUG: KASAN: null-ptr-deref in instrument_atomic_read include/linux/instrumented.h:72 [inline] BUG: KASAN: null-ptr-deref in atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline] BUG: KASAN: null-ptr-deref in page_ref_count include/linux/page_ref.h:67 [inline] BUG: KASAN: null-ptr-deref in folio_ref_count include/linux/page_ref.h:89 [inline] BUG: KASAN: null-ptr-deref in folio_get include/linux/mm.h:1167 [inline] BUG: KASAN: null-ptr-deref in hugetlb_fault+0x1423/0x23f0 mm/hugetlb.c:6112 Read of size 4 at addr 0000000000000034 by task syz-executor.2/17926 CPU: 1 PID: 17926 Comm: syz-executor.2 Not tainted 6.2.0-rc5-next-20230123-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106 kasan_report+0xc0/0xf0 mm/kasan/report.c:517 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x141/0x190 mm/kasan/generic.c:189 instrument_atomic_read include/linux/instrumented.h:72 [inline] atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline] page_ref_count include/linux/page_ref.h:67 [inline] folio_ref_count include/linux/page_ref.h:89 [inline] folio_get include/linux/mm.h:1167 [inline] hugetlb_fault+0x1423/0x23f0 mm/hugetlb.c:6112 handle_mm_fault+0x753/0x850 mm/memory.c:5196 do_user_addr_fault+0x475/0x1210 arch/x86/mm/fault.c:1407 handle_page_fault arch/x86/mm/fault.c:1498 [inline] exc_page_fault+0x98/0x170 arch/x86/mm/fault.c:1554 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570 RIP: 0010:copy_user_enhanced_fast_string+0xe/0x40 arch/x86/lib/copy_user_64.S:166 Code: d1 f3 a4 31 c0 0f 01 ca c3 8d 0c ca 89 ca eb 2c 66 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 0f 01 cb 83 fa 40 72 34 89 d1 a4 31 c0 0f 01 ca c3 89 ca eb 06 66 0f 1f 44 00 00 83 f8 12 74 RSP: 0018:ffffc90003c0fb58 EFLAGS: 00050206 RAX: 0000000000000001 RBX: 0000000000001000 RCX: 0000000000001000 RDX: 0000000000001000 RSI: 00000000204dd000 RDI: ffff888040200000 RBP: ffff888040200000 R08: 0000000000000001 R09: ffff888040200fff R10: ffffed10080401ff R11: 0000000000000000 R12: 00007fffffffe000 R13: 00000000204dd000 R14: dffffc0000000000 R15: 00000000204dd000 copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline] raw_copy_from_user arch/x86/include/asm/uaccess_64.h:52 [inline] _copy_from_user+0x13b/0x170 lib/usercopy.c:16 copy_from_user include/linux/uaccess.h:161 [inline] snd_rawmidi_kernel_write1+0x366/0x870 sound/core/rawmidi.c:1547 snd_rawmidi_write+0x277/0xbb0 sound/core/rawmidi.c:1616 vfs_write+0x2db/0xe10 fs/read_write.c:582 ksys_write+0x1ec/0x250 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fc92608c0c9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 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:00007fc926db7168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fc9261ac050 RCX: 00007fc92608c0c9 RDX: 00000000fffffd2c RSI: 0000000020000000 RDI: 0000000000000004 RBP: 00007fc9260e7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe5a35b6af R14: 00007fc926db7300 R15: 0000000000022000 ================================================================== ---------------- Code disassembly (best guess): 0: d1 f3 shl %ebx 2: a4 movsb %ds:(%rsi),%es:(%rdi) 3: 31 c0 xor %eax,%eax 5: 0f 01 ca clac 8: c3 retq 9: 8d 0c ca lea (%rdx,%rcx,8),%ecx c: 89 ca mov %ecx,%edx e: eb 2c jmp 0x3c 10: 66 66 2e 0f 1f 84 00 data16 nopw %cs:0x0(%rax,%rax,1) 17: 00 00 00 00 1b: 90 nop 1c: f3 0f 1e fa endbr64 20: 0f 01 cb stac 23: 83 fa 40 cmp $0x40,%edx 26: 72 34 jb 0x5c 28: 89 d1 mov %edx,%ecx * 2a: f3 a4 rep movsb %ds:(%rsi),%es:(%rdi) <-- trapping instruction 2c: 31 c0 xor %eax,%eax 2e: 0f 01 ca clac 31: c3 retq 32: 89 ca mov %ecx,%edx 34: eb 06 jmp 0x3c 36: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 3c: 83 f8 12 cmp $0x12,%eax 3f: 74 .byte 0x74