BUG: unable to handle kernel paging request in check_memory_region

Status: fixed on 2018/02/01 10:32
Fix commit: bbeb6e4323da bpf, array: fix overflow in max_entries and undefined behavior in index_mask
First crash: 1842d, last: 1838d

Sample crash report:
audit: type=1400 audit(1515790631.378:9): avc:  denied  { sys_chroot } for  pid=3510 comm="syzkaller602893" capability=18  scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1
BUG: unable to handle kernel paging request at ffffed004e875e33
IP: bytes_is_nonzero mm/kasan/kasan.c:166 [inline]
IP: memory_is_nonzero mm/kasan/kasan.c:184 [inline]
IP: memory_is_poisoned_n mm/kasan/kasan.c:210 [inline]
IP: memory_is_poisoned mm/kasan/kasan.c:241 [inline]
IP: check_memory_region_inline mm/kasan/kasan.c:257 [inline]
IP: check_memory_region+0x61/0x190 mm/kasan/kasan.c:267
PGD 21ffee067 P4D 21ffee067 PUD 21ffec067 PMD 0 
Oops: 0000 [#1] SMP KASAN
Dumping ftrace buffer:
   (ftrace buffer empty)
Modules linked in:
CPU: 0 PID: 3510 Comm: syzkaller602893 Not tainted 4.15.0-rc7+ #259
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:bytes_is_nonzero mm/kasan/kasan.c:166 [inline]
RIP: 0010:memory_is_nonzero mm/kasan/kasan.c:184 [inline]
RIP: 0010:memory_is_poisoned_n mm/kasan/kasan.c:210 [inline]
RIP: 0010:memory_is_poisoned mm/kasan/kasan.c:241 [inline]
RIP: 0010:check_memory_region_inline mm/kasan/kasan.c:257 [inline]
RIP: 0010:check_memory_region+0x61/0x190 mm/kasan/kasan.c:267
RSP: 0018:ffff8801bfa77770 EFLAGS: 00010202
RAX: ffffed004e875e33 RBX: ffff8802743af19b RCX: ffffffff817deb1c
RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffff8802743af198
RBP: ffff8801bfa77780 R08: 1ffff1004e875e33 R09: ffffed004e875e33
R10: 0000000000000001 R11: ffffed004e875e33 R12: ffffed004e875e34
R13: ffff8802743af198 R14: ffff8801bfc9f000 R15: ffff8801c135a680
FS:  0000000001a1d880(0000) GS:ffff8801db200000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffed004e875e33 CR3: 00000001bfe22003 CR4: 00000000001606f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 memcpy+0x23/0x50 mm/kasan/kasan.c:302
 memcpy include/linux/string.h:344 [inline]
 map_lookup_elem+0x4dc/0xbd0 kernel/bpf/syscall.c:584
 SYSC_bpf kernel/bpf/syscall.c:1711 [inline]
 SyS_bpf+0x922/0x4400 kernel/bpf/syscall.c:1685
RIP: 0033:0x440ac9
RSP: 002b:00000000007dff68 EFLAGS: 00000203 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000440ac9
RDX: 0000000000000018 RSI: 0000000020eed000 RDI: 0000000000000001
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000203 R12: 00000000004022a0
R13: 0000000000402330 R14: 0000000000000000 R15: 0000000000000000
Code: 89 f8 49 c1 e8 03 49 89 db 49 c1 eb 03 4d 01 cb 4d 01 c1 4d 8d 63 01 4c 89 c8 4d 89 e2 4d 29 ca 49 83 fa 10 7f 3d 4d 85 d2 74 33 <41> 80 39 00 75 21 48 b8 01 00 00 00 00 fc ff df 4d 01 d1 49 01 
RIP: bytes_is_nonzero mm/kasan/kasan.c:166 [inline] RSP: ffff8801bfa77770
RIP: memory_is_nonzero mm/kasan/kasan.c:184 [inline] RSP: ffff8801bfa77770
RIP: memory_is_poisoned_n mm/kasan/kasan.c:210 [inline] RSP: ffff8801bfa77770
RIP: memory_is_poisoned mm/kasan/kasan.c:241 [inline] RSP: ffff8801bfa77770
RIP: check_memory_region_inline mm/kasan/kasan.c:257 [inline] RSP: ffff8801bfa77770
RIP: check_memory_region+0x61/0x190 mm/kasan/kasan.c:267 RSP: ffff8801bfa77770
CR2: ffffed004e875e33
---[ end trace 769bd3705f3abe78 ]---
Kernel panic - not syncing: Fatal exception
Dumping ftrace buffer:
   (ftrace buffer empty)
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (10):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-kasan-gce 2018/01/12 21:00 upstream c92a9a461dff 9dc808a6 .config console log report syz C
ci-upstream-kasan-gce-386 2018/01/12 21:19 upstream c92a9a461dff 9dc808a6 .config console log report syz C
ci-upstream-net-kasan-gce 2018/01/13 00:20 net-next 19d28fbd306e 9dc808a6 .config console log report syz C
ci-upstream-mmots-kasan-gce 2018/01/12 21:19 mmots 2c405fa05106 9dc808a6 .config console log report syz C
ci-upstream-kasan-gce 2018/01/12 20:45 upstream c92a9a461dff 9dc808a6 .config console log report
ci-upstream-net-kasan-gce 2018/01/15 20:44 net-next 594831a8aba3 e17f4a5d .config console log report
ci-upstream-net-kasan-gce 2018/01/13 15:34 net-next 6bd39bc3da0f c9e7aeae .config console log report
ci-upstream-net-kasan-gce 2018/01/13 05:38 net-next 6bd39bc3da0f 9dc808a6 .config console log report
ci-upstream-net-kasan-gce 2018/01/12 18:34 net-next 19d28fbd306e 9dc808a6 .config console log report
ci-upstream-next-kasan-gce 2018/01/12 05:24 linux-next 8418f8876404 9dc808a6 .config console log report
* Struck through repros no longer work on HEAD.