FAULT_INJECTION: forcing a failure.
name failslab, interval 1, probability 0, space 0, times 1
CPU: 0 UID: 0 PID: 5323 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
fail_dump lib/fault-inject.c:73 [inline]
should_fail_ex+0x410/0x560 lib/fault-inject.c:174
should_failslab+0xa8/0x100 mm/failslab.c:46
slab_pre_alloc_hook mm/slub.c:4638 [inline]
slab_alloc_node mm/slub.c:4974 [inline]
__kmalloc_cache_node_noprof+0xaa/0x620 mm/slub.c:5578
_kmalloc_node_noprof include/linux/slab.h:1196 [inline]
bdi_alloc+0x51/0x110 mm/backing-dev.c:1027
super_setup_bdi_name+0xa8/0x210 fs/super.c:2001
ecryptfs_get_tree+0x641/0x1370 fs/ecryptfs/main.c:471
vfs_get_tree+0x92/0x2a0 fs/super.c:1947
fc_mount fs/namespace.c:1198 [inline]
do_new_mount_fc fs/namespace.c:3772 [inline]
do_new_mount+0x319/0xdc0 fs/namespace.c:3848
do_mount fs/namespace.c:4181 [inline]
__do_sys_mount fs/namespace.c:4397 [inline]
__se_sys_mount+0x31d/0x420 fs/namespace.c:4374
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fb3fbf9e159
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fb3fcdc5fe8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fb3fc225fa0 RCX: 00007fb3fbf9e159
RDX: 0000200000000480 RSI: 0000200000000440 RDI: 0000200000000400
RBP: 00007fb3fcdc6050 R08: 0000200000000500 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002
R13: 00007fb3fc226038 R14: 00007fb3fc225fa0 R15: 00007ffc1e14d9c8
==================================================================
BUG: KASAN: slab-use-after-free in ecryptfs_destroy_mount_crypt_stat+0x2ee/0x300 fs/ecryptfs/crypto.c:137
Read of size 4 at addr ffff888012327a90 by task syz.0.0/5323
CPU: 0 UID: 0 PID: 5323 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_address_description+0x55/0x1e0 mm/kasan/report.c:378
print_report+0x58/0x70 mm/kasan/report.c:482
kasan_report+0x117/0x150 mm/kasan/report.c:595
ecryptfs_destroy_mount_crypt_stat+0x2ee/0x300 fs/ecryptfs/crypto.c:137
ecryptfs_get_tree+0x1069/0x1370 fs/ecryptfs/main.c:566
vfs_get_tree+0x92/0x2a0 fs/super.c:1947
fc_mount fs/namespace.c:1198 [inline]
do_new_mount_fc fs/namespace.c:3772 [inline]
do_new_mount+0x319/0xdc0 fs/namespace.c:3848
do_mount fs/namespace.c:4181 [inline]
__do_sys_mount fs/namespace.c:4397 [inline]
__se_sys_mount+0x31d/0x420 fs/namespace.c:4374
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fb3fbf9e159
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fb3fcdc5fe8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fb3fc225fa0 RCX: 00007fb3fbf9e159
RDX: 0000200000000480 RSI: 0000200000000440 RDI: 0000200000000400
RBP: 00007fb3fcdc6050 R08: 0000200000000500 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002
R13: 00007fb3fc226038 R14: 00007fb3fc225fa0 R15: 00007ffc1e14d9c8
Allocated by task 5323:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
unpoison_slab_object mm/kasan/common.c:340 [inline]
__kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:366
kasan_slab_alloc include/linux/kasan.h:253 [inline]
slab_post_alloc_hook mm/slub.c:4683 [inline]
slab_alloc_node mm/slub.c:4996 [inline]
kmem_cache_alloc_noprof+0x2b9/0x600 mm/slub.c:5010
ecryptfs_init_fs_context+0x70/0x1b0 fs/ecryptfs/main.c:617
alloc_fs_context+0x9a3/0xd00 fs/fs_context.c:295
do_new_mount+0x17f/0xdc0 fs/namespace.c:3828
do_mount fs/namespace.c:4181 [inline]
__do_sys_mount fs/namespace.c:4397 [inline]
__se_sys_mount+0x31d/0x420 fs/namespace.c:4374
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 5323:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:253 [inline]
__kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285
kasan_slab_free include/linux/kasan.h:235 [inline]
slab_free_hook mm/slub.c:2748 [inline]
slab_free mm/slub.c:6508 [inline]
kmem_cache_free+0x182/0x650 mm/slub.c:6635
deactivate_locked_super+0xbc/0x110 fs/super.c:603
ecryptfs_get_tree+0xff6/0x1370 fs/ecryptfs/main.c:563
vfs_get_tree+0x92/0x2a0 fs/super.c:1947
fc_mount fs/namespace.c:1198 [inline]
do_new_mount_fc fs/namespace.c:3772 [inline]
do_new_mount+0x319/0xdc0 fs/namespace.c:3848
do_mount fs/namespace.c:4181 [inline]
__do_sys_mount fs/namespace.c:4397 [inline]
__se_sys_mount+0x31d/0x420 fs/namespace.c:4374
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff888012327a80
which belongs to the cache ecryptfs_sb_cache of size 280
The buggy address is located 16 bytes inside of
freed 280-byte region [ffff888012327a80, ffff888012327b98)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888012327c00 pfn:0x12327
flags: 0xfff00000000200(workingset|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000200 ffff8880003bb000 ffff8880003ba4c8 ffff8880003ba4c8
raw: ffff888012327c00 00000002000a0008 00000000f5000000 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0xd2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5323, tgid 5322 (syz.0.0), ts 92876226618
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1871
prep_new_page mm/page_alloc.c:1879 [inline]
get_page_from_freelist+0x2209/0x2280 mm/page_alloc.c:3943
__alloc_frozen_pages_noprof+0x217/0x5a0 mm/page_alloc.c:5436
alloc_slab_page mm/slub.c:3347 [inline]
allocate_slab+0x7d/0x620 mm/slub.c:3462
new_slab mm/slub.c:3513 [inline]
refill_objects+0x2d5/0x350 mm/slub.c:7417
refill_sheaf mm/slub.c:2885 [inline]
__pcs_replace_empty_main+0x2c8/0x6c0 mm/slub.c:4774
alloc_from_pcs mm/slub.c:4850 [inline]
slab_alloc_node mm/slub.c:4984 [inline]
kmem_cache_alloc_noprof+0x399/0x600 mm/slub.c:5010
ecryptfs_init_fs_context+0x70/0x1b0 fs/ecryptfs/main.c:617
alloc_fs_context+0x9a3/0xd00 fs/fs_context.c:295
do_new_mount+0x17f/0xdc0 fs/namespace.c:3828
do_mount fs/namespace.c:4181 [inline]
__do_sys_mount fs/namespace.c:4397 [inline]
__se_sys_mount+0x31d/0x420 fs/namespace.c:4374
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 1 tgid 1 ts 27409721916 stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
__free_pages_prepare mm/page_alloc.c:1418 [inline]
__free_frozen_pages+0xc93/0xd90 mm/page_alloc.c:2962
free_reserved_page include/linux/mm.h:4083 [inline]
__free_reserved_area mm/memblock.c:926 [inline]
free_reserved_area+0x204/0x2e0 mm/memblock.c:957
free_init_pages arch/x86/mm/init.c:936 [inline]
free_kernel_image_pages+0xa2/0x100 arch/x86/mm/init.c:952
kernel_init+0x36/0x1d0 init/main.c:1574
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Memory state around the buggy address:
ffff888012327980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888012327a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888012327a80: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888012327b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888012327b80: fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================