IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB ============================================ WARNING: possible recursive locking detected 5.6.0-rc1-syzkaller #0 Not tainted -------------------------------------------- syz-executor5/4577 is trying to acquire lock: ffff8881c59de0a8 (&tree->tree_lock){+.+.}, at: hfs_find_init+0x110/0x180 fs/hfs/bfind.c:28 but task is already holding lock: ffff8881c405a0a8 (&tree->tree_lock){+.+.}, at: hfs_find_init+0x110/0x180 fs/hfs/bfind.c:28 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&tree->tree_lock); lock(&tree->tree_lock); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by syz-executor5/4577: #0: ffff8881c21a80d8 (&type->s_umount_key#46/1){+.+.}, at: alloc_super+0x134/0x8a0 fs/super.c:229 #1: ffff8881c405a0a8 (&tree->tree_lock){+.+.}, at: hfs_find_init+0x110/0x180 fs/hfs/bfind.c:28 #2: ffff8881c40dd728 (&HFS_I(tree->inode)->extents_lock){+.+.}, at: hfs_get_block+0x484/0x850 fs/hfs/extent.c:365 stack backtrace: CPU: 0 PID: 4577 Comm: syz-executor5 Not tainted 5.6.0-rc1-syzkaller #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+0x12f/0x187 lib/dump_stack.c:118 print_deadlock_bug kernel/locking/lockdep.c:2370 [inline] check_deadlock kernel/locking/lockdep.c:2411 [inline] validate_chain kernel/locking/lockdep.c:2954 [inline] __lock_acquire.cold.65+0x181/0x385 kernel/locking/lockdep.c:3954 lock_acquire+0x194/0x3e0 kernel/locking/lockdep.c:4484 __mutex_lock_common kernel/locking/mutex.c:956 [inline] __mutex_lock+0x160/0x1400 kernel/locking/mutex.c:1103 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1118 hfs_find_init+0x110/0x180 fs/hfs/bfind.c:28 hfs_ext_read_extent+0x17e/0xcc0 fs/hfs/extent.c:200 hfs_get_block+0x490/0x850 fs/hfs/extent.c:366 block_read_full_page+0x288/0x950 fs/buffer.c:2285 hfs_readpage+0x13/0x20 fs/hfs/inode.c:38 do_read_cache_page+0x65c/0x12d0 mm/filemap.c:2761 read_cache_page+0x45/0x70 mm/filemap.c:2852 read_mapping_page include/linux/pagemap.h:396 [inline] __hfs_bnode_create+0x4ea/0x750 fs/hfs/bnode.c:281 hfs_bnode_find+0x1b6/0xa10 fs/hfs/bnode.c:330 hfs_brec_find+0x27e/0x490 fs/hfs/bfind.c:114 hfs_brec_read+0x1d/0xe0 fs/hfs/bfind.c:153 hfs_cat_find_brec+0x142/0x310 fs/hfs/catalog.c:194 hfs_fill_super+0xab2/0x12a0 fs/hfs/super.c:420 mount_bdev+0x27b/0x340 fs/super.c:1417 hfs_mount+0x10/0x20 fs/hfs/super.c:457 legacy_get_tree+0x103/0x1f0 fs/fs_context.c:622 vfs_get_tree+0x8b/0x2d0 fs/super.c:1547 do_new_mount fs/namespace.c:2822 [inline] do_mount+0x1285/0x1b70 fs/namespace.c:3107 __do_sys_mount fs/namespace.c:3316 [inline] __se_sys_mount fs/namespace.c:3293 [inline] __x64_sys_mount+0x169/0x1c0 fs/namespace.c:3293 do_syscall_64+0xd0/0x600 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457efa Code: b8 a6 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 dd 8f fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 ba 8f fb ff c3 66 0f 1f 84 00 00 00 00 00 RSP: 002b:00007fabb25f2ba8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000020000000 RCX: 0000000000457efa RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007fabb25f2bf0 RBP: 0000000000000003 R08: 00000000200002c0 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000003 R13: 0000000000000003 R14: 00000000006fcbb0 R15: 0000000000000000 hfs: get root inode failed hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: get root inode failed hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: get root inode failed hfs: get root inode failed hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: get root inode failed hfs: unable to locate alternate MDB hfs: get root inode failed hfs: continuing without an alternate MDB hfs: get root inode failed hfs: get root inode failed hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: get root inode failed hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: unable to locate alternate MDB hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: continuing without an alternate MDB hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: get root inode failed hfs: get root inode failed hfs: get root inode failed hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: get root inode failed hfs: get root inode failed hfs: get root inode failed hfs: get root inode failed hfs: get root inode failed hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: unable to locate alternate MDB hfs: get root inode failed hfs: continuing without an alternate MDB hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: get root inode failed hfs: get root inode failed hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: get root inode failed hfs: get root inode failed hfs: get root inode failed hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: unable to locate alternate MDB hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: continuing without an alternate MDB hfs: get root inode failed hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: get root inode failed hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: get root inode failed hfs: get root inode failed hfs: get root inode failed hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: get root inode failed hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: get root inode failed hfs: get root inode failed hfs: get root inode failed hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: get root inode failed hfs: get root inode failed hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: get root inode failed hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: get root inode failed hfs: get root inode failed hfs: get root inode failed hfs: get root inode failed hfs: get root inode failed hfs: unable to locate alternate MDB hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: continuing without an alternate MDB hfs: get root inode failed hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: get root inode failed hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB hfs: unable to locate alternate MDB hfs: continuing without an alternate MDB ================================================================== BUG: KASAN: use-after-free in memcpy include/linux/string.h:381 [inline] BUG: KASAN: use-after-free in hfs_bnode_read+0xb9/0xe0 fs/hfs/bnode.c:26 Read of size 2 at addr ffff8881b7234ffe by task syz-executor4/4731 CPU: 1 PID: 4731 Comm: syz-executor4 Not tainted 5.6.0-rc1-syzkaller #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+0x12f/0x187 lib/dump_stack.c:118 print_address_description.constprop.8+0x3b/0x60 mm/kasan/report.c:374 __kasan_report.cold.11+0x1b/0x32 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:641 check_memory_region_inline mm/kasan/generic.c:185 [inline] check_memory_region+0x153/0x1d0 mm/kasan/generic.c:192 memcpy+0x23/0x50 mm/kasan/common.c:127 memcpy include/linux/string.h:381 [inline] hfs_bnode_read+0xb9/0xe0 fs/hfs/bnode.c:26 hfs_bnode_read_u16 fs/hfs/bnode.c:34 [inline] hfs_bnode_find+0x5be/0xa10 fs/hfs/bnode.c:365 hfs_brec_find+0x27e/0x490 fs/hfs/bfind.c:114 hfs_brec_read+0x1d/0xe0 fs/hfs/bfind.c:153 hfs_cat_find_brec+0x142/0x310 fs/hfs/catalog.c:194 hfs_fill_super+0xab2/0x12a0 fs/hfs/super.c:420 mount_bdev+0x27b/0x340 fs/super.c:1417 hfs_mount+0x10/0x20 fs/hfs/super.c:457 legacy_get_tree+0x103/0x1f0 fs/fs_context.c:622 vfs_get_tree+0x8b/0x2d0 fs/super.c:1547 do_new_mount fs/namespace.c:2822 [inline] do_mount+0x1285/0x1b70 fs/namespace.c:3107 __do_sys_mount fs/namespace.c:3316 [inline] __se_sys_mount fs/namespace.c:3293 [inline] __x64_sys_mount+0x169/0x1c0 fs/namespace.c:3293 do_syscall_64+0xd0/0x600 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457efa Code: b8 a6 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 dd 8f fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 ba 8f fb ff c3 66 0f 1f 84 00 00 00 00 00 RSP: 002b:00007f0701821ba8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000020000000 RCX: 0000000000457efa RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f0701821bf0 RBP: 0000000000000003 R08: 00000000200002c0 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000003 R13: 0000000000000003 R14: 00000000006fcbb0 R15: 0000000000000000 The buggy address belongs to the page: page:ffffea0006dc8d00 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 flags: 0x2fffc0000000000() raw: 02fffc0000000000 ffffea0006ea0dc8 ffffea0006ea68c8 0000000000000000 raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881b7234e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881b7234f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8881b7234f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881b7235000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881b7235080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================