syzbot


BUG: unable to handle kernel NULL pointer dereference in setup_kmem_cache_node

Status: fixed on 2019/03/06 07:43
Subsystems: v9fs
[Documentation on labels]
Reported-by: syzbot+d6ed4ec679652b4fd4e4@syzkaller.appspotmail.com
Fix commit: 09c2e76ed734 slab: alien caches must not be initialized if the allocation of the alien cache failed
First crash: 1977d, last: 1972d
Discussions (8)
Title Replies (including bot) Last reply
[PATCH 3.18 00/52] 3.18.133-stable review 55 (55) 2019/01/25 23:16
[PATCH 4.20 00/57] 4.20.3-stable review 66 (66) 2019/01/16 21:45
[PATCH 4.19 00/50] 4.19.16-stable review 54 (54) 2019/01/16 20:38
[PATCH 4.14 00/27] 4.14.94-stable review 37 (37) 2019/01/16 20:37
[PATCH 4.9 00/16] 4.9.151-stable review 21 (21) 2019/01/16 20:37
[PATCH 4.4 00/51] 4.4.171-stable review 55 (55) 2019/01/16 20:36
[FIX] slab: Alien caches must not be initialized if the allocation of the alien cache failed 2 (2) 2019/01/06 15:57
BUG: unable to handle kernel NULL pointer dereference in setup_kmem_cache_node 3 (4) 2019/01/02 16:01

Sample crash report:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000038
#PF error: [WRITE]
PGD 926c6067 P4D 926c6067 PUD a8a50067 PMD 0 
Oops: 0002 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 10096 Comm: syz-executor2 Not tainted 4.20.0+ #6
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:init_arraycache mm/slab.c:562 [inline]
RIP: 0010:__alloc_alien_cache mm/slab.c:669 [inline]
RIP: 0010:alloc_alien_cache mm/slab.c:689 [inline]
RIP: 0010:setup_kmem_cache_node+0x1f9/0x420 mm/slab.c:910
Code: 48 0f a3 05 81 02 96 08 73 5a 48 8b 4d b0 44 89 e2 44 89 f6 48 8b 7d a0 4c 8d 2c c1 e8 40 ea ff ff 48 83 f8 c8 49 89 c7 74 17 <c7> 40 38 00 00 00 00 8b 45 b8 41 89 47 3c b8 0d f0 ad ba 49 89 47
RSP: 0018:ffff888053bcf500 EFLAGS: 00010213
RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000200000
RDX: 000000000c3ff200 RSI: 00000000000000a8 RDI: ffff88812c3f0040
RBP: ffff888053bcf568 R08: ffff888093fe4140 R09: ffffed1015ce5b90
R10: ffffed1015ce5b8f R11: ffff8880ae72dc7b R12: 0000000000000000
R13: ffff8880a4f4e408 R14: 00000000006000c0 R15: 0000000000000000
FS:  00007f68e9046700(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000038 CR3: 0000000056100000 CR4: 00000000001426e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 setup_kmem_cache_nodes mm/slab.c:3819 [inline]
 __do_tune_cpucache+0x161/0x220 mm/slab.c:3889
 do_tune_cpucache+0x25/0xd0 mm/slab.c:3898
 enable_cpucache+0x3e/0xd0 mm/slab.c:3979
 setup_cpu_cache+0xd4/0x1e0 mm/slab.c:1821
 __kmem_cache_create+0x1bb/0x270 mm/slab.c:2134
 create_cache+0xd4/0x200 mm/slab_common.c:391
 kmem_cache_create_usercopy+0x1a5/0x260 mm/slab_common.c:489
 p9_client_create+0xf2d/0x179a net/9p/client.c:1075
 v9fs_session_init+0x1f3/0x1be0 fs/9p/v9fs.c:421
 v9fs_mount+0x7d/0x920 fs/9p/vfs_super.c:135
 mount_fs+0xae/0x331 fs/super.c:1261
 vfs_kern_mount.part.0+0xdb/0x570 fs/namespace.c:961
 vfs_kern_mount fs/namespace.c:951 [inline]
 do_new_mount fs/namespace.c:2469 [inline]
 do_mount+0x576/0x3110 fs/namespace.c:2801
 ksys_mount+0xdb/0x150 fs/namespace.c:3017
 __do_sys_mount fs/namespace.c:3031 [inline]
 __se_sys_mount fs/namespace.c:3028 [inline]
 __x64_sys_mount+0xbe/0x150 fs/namespace.c:3028
 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x457ec9
Code: 6d b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 3b b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f68e9045c78 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f68e9045c90 RCX: 0000000000457ec9
RDX: 0000000020000000 RSI: 00000000200000c0 RDI: 0000000000000000
RBP: 000000000073bf00 R08: 0000000020000040 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f68e90466d4
R13: 00000000004c3a5a R14: 00000000004d66a0 R15: 0000000000000005
Modules linked in:
CR2: 0000000000000038
kobject: 'tx-0' (0000000063d291ba): kobject_uevent_env
kobject: 'tx-0' (0000000063d291ba): fill_kobj_path: path = '/devices/virtual/net/sit0.0/queues/tx-0'
kobject: 'loop3' (0000000045061976): kobject_uevent_env
kobject: 'loop3' (0000000045061976): fill_kobj_path: path = '/devices/virtual/block/loop3'
kobject: 'batman_adv' (000000003032f94f): kobject_add_internal: parent: 'sit0.0', set: '<NULL>'
kobject: 'loop4' (0000000020a78801): kobject_uevent_env
kobject: 'loop4' (0000000020a78801): fill_kobj_path: path = '/devices/virtual/block/loop4'
kobject: 'lo' (0000000097e509ea): kobject_add_internal: parent: 'net', set: 'devices'
---[ end trace 251467ced1638eaa ]---
kobject: 'lo' (0000000097e509ea): kobject_uevent_env
RIP: 0010:init_arraycache mm/slab.c:562 [inline]
RIP: 0010:__alloc_alien_cache mm/slab.c:669 [inline]
RIP: 0010:alloc_alien_cache mm/slab.c:689 [inline]
RIP: 0010:setup_kmem_cache_node+0x1f9/0x420 mm/slab.c:910
Code: 48 0f a3 05 81 02 96 08 73 5a 48 8b 4d b0 44 89 e2 44 89 f6 48 8b 7d a0 4c 8d 2c c1 e8 40 ea ff ff 48 83 f8 c8 49 89 c7 74 17 <c7> 40 38 00 00 00 00 8b 45 b8 41 89 47 3c b8 0d f0 ad ba 49 89 47
kobject: 'lo' (0000000097e509ea): fill_kobj_path: path = '/devices/virtual/net/lo'
RSP: 0018:ffff888053bcf500 EFLAGS: 00010213
RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000200000
RDX: 000000000c3ff200 RSI: 00000000000000a8 RDI: ffff88812c3f0040
RBP: ffff888053bcf568 R08: ffff888093fe4140 R09: ffffed1015ce5b90
R10: ffffed1015ce5b8f R11: ffff8880ae72dc7b R12: 0000000000000000
R13: ffff8880a4f4e408 R14: 00000000006000c0 R15: 0000000000000000
kobject: 'queues' (000000008c1c344e): kobject_add_internal: parent: 'lo', set: '<NULL>'
FS:  00007f68e9046700(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b3012e000 CR3: 0000000056100000 CR4: 00000000001426e0
kobject: 'queues' (000000008c1c344e): kobject_uevent_env
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
kobject: 'queues' (000000008c1c344e): kobject_uevent_env: filter function caused the event to drop!
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
kobject: 'rx-0' (00000000106a2ed2): kobject_add_internal: parent: 'queues', set: 'queues'

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/01/03 07:22 upstream 85f78456f286 06a2b89f .config console log report ci-upstream-kasan-gce-smack-root
2019/01/01 20:37 upstream e1ef035d272e 3d85f48c .config console log report ci-upstream-kasan-gce-root
2018/12/29 14:41 upstream 903b77c63167 a40793d7 .config console log report ci-upstream-kasan-gce-smack-root
* Struck through repros no longer work on HEAD.