syzbot


KASAN: null-ptr-deref Read in hugepage_vma_check

Status: upstream: reported C repro on 2022/06/17 07:04
Reported-by: syzbot+4d875b4d2e2b60bae9b4@syzkaller.appspotmail.com
First crash: 99d, last: 94d

Cause bisection: introduced by (bisect log) :
commit 0a44ebaaa3f3ecfacd2744467957882eabd92cec
Author: Yang Shi <shy828301@gmail.com>
Date: Thu Jun 16 17:48:37 2022 +0000

  mm: thp: kill transparent_hugepage_active()

Crash: KASAN: null-ptr-deref Read in hugepage_vma_check (log)
Repro: C syz .config

Sample crash report:
==================================================================
BUG: KASAN: null-ptr-deref in instrument_atomic_read include/linux/instrumented.h:71 [inline]
BUG: KASAN: null-ptr-deref in test_bit include/asm-generic/bitops/instrumented-non-atomic.h:134 [inline]
BUG: KASAN: null-ptr-deref in hugepage_vma_check+0x8e/0x750 mm/huge_memory.c:82
Read of size 8 at addr 00000000000005a8 by task syz-executor405/3606

CPU: 0 PID: 3606 Comm: syz-executor405 Not tainted 5.19.0-rc3-next-20220621-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 kasan_report+0xbe/0x1f0 mm/kasan/report.c:495
 check_region_inline mm/kasan/generic.c:183 [inline]
 kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189
 instrument_atomic_read include/linux/instrumented.h:71 [inline]
 test_bit include/asm-generic/bitops/instrumented-non-atomic.h:134 [inline]
 hugepage_vma_check+0x8e/0x750 mm/huge_memory.c:82
 show_smap+0x1c6/0x470 fs/proc/task_mmu.c:866
 traverse.part.0+0xcf/0x5f0 fs/seq_file.c:111
 traverse fs/seq_file.c:101 [inline]
 seq_read_iter+0x90f/0x1280 fs/seq_file.c:195
 seq_read+0x337/0x4b0 fs/seq_file.c:162
 do_loop_readv_writev fs/read_write.c:763 [inline]
 do_loop_readv_writev fs/read_write.c:750 [inline]
 do_iter_read+0x4f8/0x750 fs/read_write.c:805
 vfs_readv+0xe5/0x150 fs/read_write.c:923
 do_preadv fs/read_write.c:1015 [inline]
 __do_sys_preadv fs/read_write.c:1065 [inline]
 __se_sys_preadv fs/read_write.c:1060 [inline]
 __x64_sys_preadv+0x22b/0x310 fs/read_write.c:1060
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x46/0xb0
RIP: 0033:0x7fcb44a75239
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:00007ffedce269f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000127
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fcb44a75239
RDX: 0000000000000001 RSI: 00000000200006c0 RDI: 0000000000000003
RBP: 00007ffedce26a00 R08: 0000000000000000 R09: 65732f636f72702f
R10: 00000000fffffffe R11: 0000000000000246 R12: 00007fcb44a39120
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>
==================================================================

Crashes (22):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-linux-next-kasan-gce-root 2022/06/21 15:09 linux-next 34d1d36073ea 0fc5c330 .config log report syz C KASAN: null-ptr-deref Read in hugepage_vma_check
ci-upstream-linux-next-kasan-gce-root 2022/06/22 09:36 linux-next 34d1d36073ea 0fc5c330 .config log report info KASAN: null-ptr-deref Read in hugepage_vma_check
ci-upstream-linux-next-kasan-gce-root 2022/06/22 09:22 linux-next 34d1d36073ea 0fc5c330 .config log report info KASAN: null-ptr-deref Read in hugepage_vma_check
ci-upstream-linux-next-kasan-gce-root 2022/06/22 03:22 linux-next 34d1d36073ea 0fc5c330 .config log report info KASAN: null-ptr-deref Read in hugepage_vma_check
ci-upstream-linux-next-kasan-gce-root 2022/06/22 02:18 linux-next 34d1d36073ea 0fc5c330 .config log report info KASAN: null-ptr-deref Read in hugepage_vma_check
ci-upstream-linux-next-kasan-gce-root 2022/06/22 02:08 linux-next 34d1d36073ea 0fc5c330 .config log report info KASAN: null-ptr-deref Read in hugepage_vma_check
ci-upstream-linux-next-kasan-gce-root 2022/06/22 01:51 linux-next 34d1d36073ea 0fc5c330 .config log report info KASAN: null-ptr-deref Read in hugepage_vma_check
ci-upstream-linux-next-kasan-gce-root 2022/06/21 23:05 linux-next 34d1d36073ea 0fc5c330 .config log report info KASAN: null-ptr-deref Read in hugepage_vma_check
ci-upstream-linux-next-kasan-gce-root 2022/06/21 19:59 linux-next 34d1d36073ea 0fc5c330 .config log report info KASAN: null-ptr-deref Read in hugepage_vma_check
ci-upstream-linux-next-kasan-gce-root 2022/06/21 14:41 linux-next 34d1d36073ea 0fc5c330 .config log report info KASAN: null-ptr-deref Read in hugepage_vma_check
ci-upstream-linux-next-kasan-gce-root 2022/06/21 14:41 linux-next 34d1d36073ea 0fc5c330 .config log report info KASAN: null-ptr-deref Read in hugepage_vma_check
ci-upstream-linux-next-kasan-gce-root 2022/06/21 12:54 linux-next 34d1d36073ea 0fc5c330 .config log report info KASAN: null-ptr-deref Read in hugepage_vma_check
ci-upstream-linux-next-kasan-gce-root 2022/06/21 12:44 linux-next 34d1d36073ea 0fc5c330 .config log report info KASAN: null-ptr-deref Read in hugepage_vma_check
ci-upstream-linux-next-kasan-gce-root 2022/06/21 11:20 linux-next 34d1d36073ea 0fc5c330 .config log report info KASAN: null-ptr-deref Read in hugepage_vma_check
ci-upstream-linux-next-kasan-gce-root 2022/06/21 11:16 linux-next 34d1d36073ea 0fc5c330 .config log report info KASAN: null-ptr-deref Read in hugepage_vma_check
ci-upstream-linux-next-kasan-gce-root 2022/06/21 10:52 linux-next 34d1d36073ea 0fc5c330 .config log report info KASAN: null-ptr-deref Read in hugepage_vma_check
ci-upstream-linux-next-kasan-gce-root 2022/06/20 14:23 linux-next 1e502319853c 8d15e28d .config log report info KASAN: null-ptr-deref Read in hugepage_vma_check
ci-upstream-linux-next-kasan-gce-root 2022/06/20 14:21 linux-next 1e502319853c 8d15e28d .config log report info KASAN: null-ptr-deref Read in hugepage_vma_check
ci-upstream-linux-next-kasan-gce-root 2022/06/20 14:15 linux-next 1e502319853c 8d15e28d .config log report info KASAN: null-ptr-deref Read in hugepage_vma_check
ci-upstream-linux-next-kasan-gce-root 2022/06/20 05:42 linux-next 07dc787be231 8f633d84 .config log report info KASAN: null-ptr-deref Read in hugepage_vma_check
ci-upstream-linux-next-kasan-gce-root 2022/06/17 03:16 linux-next c6d7e3b385f1 1719ee24 .config log report info KASAN: null-ptr-deref Read in hugepage_vma_check
ci-upstream-linux-next-kasan-gce-root 2022/06/17 02:30 linux-next c6d7e3b385f1 1719ee24 .config log report info KASAN: null-ptr-deref Read in hugepage_vma_check
* Struck through repros no longer work on HEAD.