syzbot


KASAN: invalid-free in create_cache

Status: upstream: reported C repro on 2020/11/28 03:57
Reported-by: syzbot+6038e5964bf567082212@syzkaller.appspotmail.com
First crash: 738d, last: 669d

Sample crash report:
R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffff
R13: 0000000000000005 R14: 0000000000000000 R15: 0000000000000000
BUG: KASAN: double-free or invalid-free in slab_free mm/slub.c:3051 [inline]
BUG: KASAN: double-free or invalid-free in kmem_cache_free+0xac/0x610 mm/slub.c:3067

CPU: 0 PID: 403 Comm: syz-executor525 Not tainted 5.4.80-syzkaller-00759-ge37aca80313f #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1dd/0x24e lib/dump_stack.c:118
 print_address_description+0x96/0x640 mm/kasan/report.c:374
 kasan_report_invalid_free+0x54/0xc0 mm/kasan/report.c:468
 __kasan_slab_free+0x102/0x230 mm/kasan/common.c:459
 slab_free_hook mm/slub.c:1453 [inline]
 slab_free_freelist_hook+0xd0/0x150 mm/slub.c:1486
 slab_free mm/slub.c:3051 [inline]
 kmem_cache_free+0xac/0x610 mm/slub.c:3067
 create_cache+0x1cc/0x1f0 mm/slab_common.c:429
 kmem_cache_create_usercopy+0x145/0x1d0 mm/slab_common.c:513
 p9_client_create+0x9ff/0xb90 net/9p/client.c:1061
 v9fs_session_init+0x208/0x1a00 fs/9p/v9fs.c:406
 v9fs_mount+0x7f/0x790 fs/9p/vfs_super.c:124
 legacy_get_tree+0xde/0x170 fs/fs_context.c:647
 vfs_get_tree+0x85/0x260 fs/super.c:1547
 do_new_mount fs/namespace.c:2822 [inline]
 do_mount+0x18ab/0x2660 fs/namespace.c:3142
 ksys_mount+0xc2/0xf0 fs/namespace.c:3351
 __do_sys_mount fs/namespace.c:3365 [inline]
 __se_sys_mount fs/namespace.c:3362 [inline]
 __x64_sys_mount+0xb1/0xc0 fs/namespace.c:3362
 do_syscall_64+0xcb/0x150 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x446359
Code: e8 1c e7 ff ff 48 83 c4 18 c3 0f 1f 80 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 0f 83 fb 01 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffc34fb9a38 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000446359
RDX: 00000000200001c0 RSI: 0000000020000180 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000020000380 R09: 0000000000003532
R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffff
R13: 0000000000000005 R14: 0000000000000000 R15: 0000000000000000

Allocated by task 403:
 save_stack mm/kasan/common.c:69 [inline]
 set_track mm/kasan/common.c:77 [inline]
 __kasan_kmalloc+0x129/0x1c0 mm/kasan/common.c:510
 slab_post_alloc_hook mm/slab.h:584 [inline]
 slab_alloc_node mm/slub.c:2803 [inline]
 slab_alloc mm/slub.c:2811 [inline]
 kmem_cache_alloc+0x1e0/0x270 mm/slub.c:2816
 kmem_cache_zalloc include/linux/slab.h:680 [inline]
 create_cache+0x3b/0x1f0 mm/slab_common.c:400
 kmem_cache_create_usercopy+0x145/0x1d0 mm/slab_common.c:513
 p9_client_create+0x9ff/0xb90 net/9p/client.c:1061
 v9fs_session_init+0x208/0x1a00 fs/9p/v9fs.c:406
 v9fs_mount+0x7f/0x790 fs/9p/vfs_super.c:124
 legacy_get_tree+0xde/0x170 fs/fs_context.c:647
 vfs_get_tree+0x85/0x260 fs/super.c:1547
 do_new_mount fs/namespace.c:2822 [inline]
 do_mount+0x18ab/0x2660 fs/namespace.c:3142
 ksys_mount+0xc2/0xf0 fs/namespace.c:3351
 __do_sys_mount fs/namespace.c:3365 [inline]
 __se_sys_mount fs/namespace.c:3362 [inline]
 __x64_sys_mount+0xb1/0xc0 fs/namespace.c:3362
 do_syscall_64+0xcb/0x150 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Freed by task 403:
 save_stack mm/kasan/common.c:69 [inline]
 set_track mm/kasan/common.c:77 [inline]
 kasan_set_free_info mm/kasan/common.c:332 [inline]
 __kasan_slab_free+0x17e/0x230 mm/kasan/common.c:471
 slab_free_hook mm/slub.c:1453 [inline]
 slab_free_freelist_hook+0xd0/0x150 mm/slub.c:1486
 slab_free mm/slub.c:3051 [inline]
 kmem_cache_free+0xac/0x610 mm/slub.c:3067
 kobject_cleanup+0x1e1/0x3c0 lib/kobject.c:708
 sysfs_slab_add+0x1a1/0x310 mm/slub.c:5825
 __kmem_cache_create+0x67c/0x6f0 mm/slub.c:4375
 create_cache+0x156/0x1f0 mm/slab_common.c:415
 kmem_cache_create_usercopy+0x145/0x1d0 mm/slab_common.c:513
 p9_client_create+0x9ff/0xb90 net/9p/client.c:1061
 v9fs_session_init+0x208/0x1a00 fs/9p/v9fs.c:406
 v9fs_mount+0x7f/0x790 fs/9p/vfs_super.c:124
 legacy_get_tree+0xde/0x170 fs/fs_context.c:647
 vfs_get_tree+0x85/0x260 fs/super.c:1547
 do_new_mount fs/namespace.c:2822 [inline]
 do_mount+0x18ab/0x2660 fs/namespace.c:3142
 ksys_mount+0xc2/0xf0 fs/namespace.c:3351
 __do_sys_mount fs/namespace.c:3365 [inline]
 __se_sys_mount fs/namespace.c:3362 [inline]
 __x64_sys_mount+0xb1/0xc0 fs/namespace.c:3362
 do_syscall_64+0xcb/0x150 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

The buggy address belongs to the object at ffff8881e24e7b80
 which belongs to the cache kmem_cache of size 472
The buggy address is located 0 bytes inside of
 472-byte region [ffff8881e24e7b80, ffff8881e24e7d58)
The buggy address belongs to the page:
page:ffffea0007893980 refcount:1 mapcount:0 mapping:ffff8881f6002000 index:0x0 compound_mapcount: 0
flags: 0x8000000000010200(slab|head)
raw: 8000000000010200 dead000000000100 dead000000000122 ffff8881f6002000
raw: 0000000000000000 00000000800c000c 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8881e24e7a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8881e24e7b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8881e24e7b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                   ^
 ffff8881e24e7c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8881e24e7c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
CPU: 0 PID: 403 Comm: syz-executor525 Tainted: G    B             5.4.80-syzkaller-00759-ge37aca80313f #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1dd/0x24e lib/dump_stack.c:118
 panic+0x285/0x750 kernel/panic.c:221
 end_report mm/kasan/report.c:96 [inline]
 kasan_report_invalid_free+0xb7/0xc0 mm/kasan/report.c:471
 __kasan_slab_free+0x102/0x230 mm/kasan/common.c:459
 slab_free_hook mm/slub.c:1453 [inline]
 slab_free_freelist_hook+0xd0/0x150 mm/slub.c:1486
 slab_free mm/slub.c:3051 [inline]
 kmem_cache_free+0xac/0x610 mm/slub.c:3067
 create_cache+0x1cc/0x1f0 mm/slab_common.c:429
 kmem_cache_create_usercopy+0x145/0x1d0 mm/slab_common.c:513
 p9_client_create+0x9ff/0xb90 net/9p/client.c:1061
 v9fs_session_init+0x208/0x1a00 fs/9p/v9fs.c:406
 v9fs_mount+0x7f/0x790 fs/9p/vfs_super.c:124
 legacy_get_tree+0xde/0x170 fs/fs_context.c:647
 vfs_get_tree+0x85/0x260 fs/super.c:1547
 do_new_mount fs/namespace.c:2822 [inline]
 do_mount+0x18ab/0x2660 fs/namespace.c:3142
 ksys_mount+0xc2/0xf0 fs/namespace.c:3351
 __do_sys_mount fs/namespace.c:3365 [inline]
 __se_sys_mount fs/namespace.c:3362 [inline]
 __x64_sys_mount+0xb1/0xc0 fs/namespace.c:3362
 do_syscall_64+0xcb/0x150 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x446359
Code: e8 1c e7 ff ff 48 83 c4 18 c3 0f 1f 80 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 0f 83 fb 01 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffc34fb9a38 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000446359
RDX: 00000000200001c0 RSI: 0000000020000180 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000020000380 R09: 0000000000003532
R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffff
R13: 0000000000000005 R14: 0000000000000000 R15: 0000000000000000
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (159):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-android-5-4-kasan 2020/11/28 04:14 android12-5.4 e37aca80313f 486f93ef .config log report syz C
ci2-android-5-4-kasan 2021/02/05 00:37 android12-5.4 1e5f5a14faba 23a562df .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/02/04 22:30 android12-5.4 1e5f5a14faba 42b90a7c .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/02/02 02:42 android12-5.4 1e5f5a14faba e6b95f32 .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/02/01 15:14 android12-5.4 1e5f5a14faba e6b95f32 .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/02/01 04:53 android12-5.4 1e5f5a14faba fc9fd31e .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/01/31 17:12 android12-5.4 1e5f5a14faba fc9fd31e .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/01/30 22:58 android12-5.4 1e5f5a14faba fc9fd31e .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/01/30 16:17 android12-5.4 1e5f5a14faba fc9fd31e .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/01/30 13:49 android12-5.4 1e5f5a14faba fc9fd31e .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/01/29 05:14 android12-5.4 b5413c2c1672 7df34f59 .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/01/28 10:01 android12-5.4 5f5bfa0cfcb5 eefc07f2 .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/01/26 11:55 android12-5.4 ecfe49f9ef4c 52e37319 .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/01/26 05:34 android12-5.4 18b1db92afb1 52e37319 .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/01/25 06:01 android12-5.4 18b1db92afb1 52e37319 .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/01/24 20:21 android12-5.4 18b1db92afb1 52e37319 .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/01/24 14:07 android12-5.4 18b1db92afb1 52e37319 .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/01/24 13:11 android12-5.4 18b1db92afb1 52e37319 .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/01/24 00:03 android12-5.4 18b1db92afb1 52e37319 .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/01/23 20:52 android12-5.4 18b1db92afb1 52e37319 .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/01/22 14:06 android12-5.4 15cec007c4a8 d4f4eca5 .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/01/22 12:51 android12-5.4 15cec007c4a8 d4f4eca5 .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/01/22 09:07 android12-5.4 15cec007c4a8 d4f4eca5 .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/01/22 07:00 android12-5.4 15cec007c4a8 d4f4eca5 .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/01/21 11:55 android12-5.4 8fb07f60a84d d4f4eca5 .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/01/21 10:50 android12-5.4 8fb07f60a84d d4f4eca5 .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/01/20 21:01 android12-5.4 e4139b2a81bd d4f4eca5 .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/01/19 05:46 android12-5.4 41724582d2a8 63631df1 .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/01/18 21:13 android12-5.4 41724582d2a8 63631df1 .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/01/18 17:09 android12-5.4 dc04463953b2 63631df1 .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/01/17 20:38 android12-5.4 dc04463953b2 fd103621 .config log report info KASAN: invalid-free in create_cache
ci2-android-5-4-kasan 2021/01/17 05:43 android12-5.4 dc04463953b2 65a7a854 .config log report info
ci2-android-5-4-kasan 2021/01/16 16:07 android12-5.4 dc04463953b2 65a7a854 .config log report info
ci2-android-5-4-kasan 2021/01/16 15:06 android12-5.4 dc04463953b2 65a7a854 .config log report info
ci2-android-5-4-kasan 2021/01/16 11:44 android12-5.4 dc04463953b2 65a7a854 .config log report info
ci2-android-5-4-kasan 2021/01/15 21:39 android12-5.4 dc04463953b2 65a7a854 .config log report info
ci2-android-5-4-kasan 2021/01/14 13:24 android12-5.4 e5e14bf558c4 269d24e8 .config log report info
ci2-android-5-4-kasan 2021/01/14 08:06 android12-5.4 e5e14bf558c4 269d24e8 .config log report info
ci2-android-5-4-kasan 2021/01/13 01:07 android12-5.4 06fb191a3ca7 0cdd6185 .config log report info
ci2-android-5-4-kasan 2021/01/12 18:08 android12-5.4 62ec51519fa1 2c1f2513 .config log report info
ci2-android-5-4-kasan 2021/01/12 09:46 android12-5.4 62ec51519fa1 2c1f2513 .config log report info
ci2-android-5-4-kasan 2021/01/12 03:45 android12-5.4 62ec51519fa1 2c1f2513 .config log report info
ci2-android-5-4-kasan 2021/01/11 21:59 android12-5.4 62ec51519fa1 2c1f2513 .config log report info
ci2-android-5-4-kasan 2021/01/11 08:29 android12-5.4 c9951e5d80dd 2c1f2513 .config log report info
ci2-android-5-4-kasan 2021/01/11 06:51 android12-5.4 c9951e5d80dd 2c1f2513 .config log report info
ci2-android-5-4-kasan 2021/01/11 04:50 android12-5.4 c9951e5d80dd 2c1f2513 .config log report info
ci2-android-5-4-kasan 2021/01/11 01:33 android12-5.4 c9951e5d80dd 2c1f2513 .config log report info
ci2-android-5-4-kasan 2021/01/10 00:15 android12-5.4 47494776db44 2c1f2513 .config log report info
ci2-android-5-4-kasan 2021/01/09 20:57 android12-5.4 47494776db44 a6c52263 .config log report info
ci2-android-5-4-kasan 2021/01/09 13:49 android12-5.4 47494776db44 a6c52263 .config log report info
ci2-android-5-4-kasan 2020/11/28 03:56 android12-5.4 e37aca80313f 486f93ef .config log report info
* Struck through repros no longer work on HEAD.