EXT4-fs error (device loop3): ext4_xattr_block_get:533: inode #15: comm syz-executor.3: corrupted xattr block 19 BTRFS error (device loop4): unsupported checksum algorithm 2 BTRFS error (device loop4): superblock checksum mismatch ====================================================== WARNING: possible circular locking dependency detected 4.14.307-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.2/9889 is trying to acquire lock: ("%s-%s""btrfs", name){+.+.}, at: [] flush_workqueue+0xcb/0x1310 kernel/workqueue.c:2622 but task is already holding lock: (&fs_info->scrub_lock){+.+.}, at: [] btrfs_scrub_dev+0x506/0xcd0 fs/btrfs/scrub.c:4217 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&fs_info->scrub_lock){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 btrfs_scrub_dev+0x1f3/0xcd0 fs/btrfs/scrub.c:4150 btrfs_ioctl_scrub fs/btrfs/ioctl.c:4451 [inline] btrfs_ioctl+0xba8/0x5b20 fs/btrfs/ioctl.c:5681 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xff0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 -> #2 (&fs_devs->device_list_mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 __reada_start_machine fs/btrfs/reada.c:765 [inline] reada_start_machine_worker+0x1d2/0xa90 fs/btrfs/reada.c:746 normal_work_helper+0x304/0x1330 fs/btrfs/async-thread.c:376 process_one_work+0x793/0x14a0 kernel/workqueue.c:2117 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2251 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:406 -> #1 ((&work->normal_work)){+.+.}: process_one_work+0x736/0x14a0 kernel/workqueue.c:2093 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2251 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:406 -> #0 ("%s-%s""btrfs", name){+.+.}: lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 flush_workqueue+0xfa/0x1310 kernel/workqueue.c:2625 drain_workqueue+0x177/0x3e0 kernel/workqueue.c:2790 destroy_workqueue+0x71/0x710 kernel/workqueue.c:4116 __btrfs_destroy_workqueue fs/btrfs/async-thread.c:436 [inline] btrfs_destroy_workqueue+0xf8/0x630 fs/btrfs/async-thread.c:447 scrub_workers_put+0x90/0x1a0 fs/btrfs/scrub.c:4075 btrfs_scrub_dev+0x536/0xcd0 fs/btrfs/scrub.c:4219 btrfs_ioctl_scrub fs/btrfs/ioctl.c:4451 [inline] btrfs_ioctl+0xba8/0x5b20 fs/btrfs/ioctl.c:5681 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xff0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 other info that might help us debug this: Chain exists of: "%s-%s""btrfs", name --> &fs_devs->device_list_mutex --> &fs_info->scrub_lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&fs_info->scrub_lock); lock(&fs_devs->device_list_mutex); lock(&fs_info->scrub_lock); lock("%s-%s""btrfs", name); *** DEADLOCK *** 1 lock held by syz-executor.2/9889: #0: (&fs_info->scrub_lock){+.+.}, at: [] btrfs_scrub_dev+0x506/0xcd0 fs/btrfs/scrub.c:4217 stack backtrace: CPU: 1 PID: 9889 Comm: syz-executor.2 Not tainted 4.14.307-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/16/2023 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1258 check_prev_add kernel/locking/lockdep.c:1905 [inline] check_prevs_add kernel/locking/lockdep.c:2022 [inline] validate_chain kernel/locking/lockdep.c:2464 [inline] __lock_acquire+0x2e0e/0x3f20 kernel/locking/lockdep.c:3491 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 flush_workqueue+0xfa/0x1310 kernel/workqueue.c:2625 drain_workqueue+0x177/0x3e0 kernel/workqueue.c:2790 destroy_workqueue+0x71/0x710 kernel/workqueue.c:4116 __btrfs_destroy_workqueue fs/btrfs/async-thread.c:436 [inline] btrfs_destroy_workqueue+0xf8/0x630 fs/btrfs/async-thread.c:447 scrub_workers_put+0x90/0x1a0 fs/btrfs/scrub.c:4075 btrfs_scrub_dev+0x536/0xcd0 fs/btrfs/scrub.c:4219 btrfs_ioctl_scrub fs/btrfs/ioctl.c:4451 [inline] btrfs_ioctl+0xba8/0x5b20 fs/btrfs/ioctl.c:5681 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xff0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 RIP: 0033:0x7f39d481a0f9 RSP: 002b:00007f39d2d8c168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f39d4939f80 RCX: 00007f39d481a0f9 RDX: 0000000020000100 RSI: 00000000c400941b RDI: 0000000000000004 RBP: 00007f39d4875ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffde9f64adf R14: 00007f39d2d8c300 R15: 0000000000022000 BTRFS error (device loop4): open_ctree failed ====================================================== WARNING: the mand mount option is being deprecated and will be removed in v5.15! ====================================================== VFS: Found a Xenix FS (block size = 512) on device loop0 sysv_free_block: trying to free block not in datazone sysv_free_inode: inode 0,1,2 or nonexistent inode F2FS-fs (loop3): Found nat_bits in checkpoint F2FS-fs (loop3): Mounted with checkpoint version = 48b305e5 attempt to access beyond end of device loop3: rw=2049, want=45104, limit=40427 VFS: Found a Xenix FS (block size = 512) on device loop0 EXT4-fs (loop3): mounted filesystem without journal. Opts: init_itable,usrjquota=,lazytime,noauto_da_alloc,grpquota,,errors=continue sysv_free_block: trying to free block not in datazone sysv_free_inode: inode 0,1,2 or nonexistent inode EXT4-fs error (device loop3): ext4_xattr_block_get:533: inode #15: comm syz-executor.3: corrupted xattr block 19 EXT4-fs error (device loop3): ext4_xattr_block_get:533: inode #15: comm syz-executor.3: corrupted xattr block 19 VFS: Found a Xenix FS (block size = 512) on device loop0 sysv_free_block: trying to free block not in datazone sysv_free_inode: inode 0,1,2 or nonexistent inode XFS (loop4): Superblock has unknown read-only compatible features (0x8) enabled. XFS (loop4): Attempted to mount read-only compatible filesystem read-write. XFS (loop4): Filesystem can only be safely mounted read only. XFS (loop4): SB validate failed with error -22. F2FS-fs (loop1): Found nat_bits in checkpoint F2FS-fs (loop1): sanity_check_inode: inode (ino=3) has corrupted i_extra_isize: 24, max: 12 F2FS-fs (loop1): Failed to read root inode F2FS-fs (loop1): Found nat_bits in checkpoint F2FS-fs (loop1): sanity_check_inode: inode (ino=3) has corrupted i_extra_isize: 24, max: 12 F2FS-fs (loop1): Failed to read root inode VFS: Found a Xenix FS (block size = 512) on device loop0 sysv_free_block: trying to free block not in datazone sysv_free_inode: inode 0,1,2 or nonexistent inode F2FS-fs (loop1): Found nat_bits in checkpoint F2FS-fs (loop1): Mounted with checkpoint version = 48b305e5 attempt to access beyond end of device loop1: rw=2049, want=45104, limit=40427 BTRFS info (device loop4): enabling inode map caching BTRFS info (device loop4): trying to use backup root at mount time BTRFS info (device loop4): use zlib compression BTRFS info (device loop4): enabling ssd optimizations BTRFS info (device loop4): using spread ssd allocation scheme BTRFS info (device loop4): using free space tree BTRFS info (device loop4): has skinny extents attempt to access beyond end of device loop3: rw=2049, want=45104, limit=40427 BTRFS info (device loop2): enabling inode map caching BTRFS info (device loop2): trying to use backup root at mount time BTRFS info (device loop2): use zlib compression BTRFS info (device loop2): enabling ssd optimizations BTRFS info (device loop2): using spread ssd allocation scheme BTRFS info (device loop2): using free space tree BTRFS info (device loop2): has skinny extents BTRFS info (device loop2): enabling inode map caching BTRFS info (device loop2): trying to use backup root at mount time BTRFS info (device loop2): use zlib compression BTRFS info (device loop2): enabling ssd optimizations BTRFS info (device loop2): using spread ssd allocation scheme BTRFS info (device loop2): using free space tree BTRFS info (device loop2): has skinny extents BTRFS info (device loop4): enabling inode map caching BTRFS info (device loop4): trying to use backup root at mount time BTRFS info (device loop4): use zlib compression BTRFS info (device loop4): enabling ssd optimizations BTRFS info (device loop4): using spread ssd allocation scheme BTRFS info (device loop4): using free space tree BTRFS info (device loop4): has skinny extents ================================================================== BUG: KASAN: slab-out-of-bounds in tipc_nametbl_lookup_dst_nodes+0x44c/0x4c0 net/tipc/name_table.c:670 Read of size 4 at addr ffff8880b60f4550 by task syz-executor.2/10772 CPU: 0 PID: 10772 Comm: syz-executor.2 Not tainted 4.14.307-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/16/2023 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:251 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:350 kasan_report mm/kasan/report.c:408 [inline] __asan_report_load4_noabort+0x68/0x70 mm/kasan/report.c:428 tipc_nametbl_lookup_dst_nodes+0x44c/0x4c0 net/tipc/name_table.c:670 tipc_sendmcast+0x51a/0xac0 net/tipc/socket.c:768 __tipc_sendmsg+0xbab/0xf90 net/tipc/socket.c:975 tipc_sendmsg+0x4c/0x70 net/tipc/socket.c:923 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 ___sys_sendmsg+0x6c8/0x800 net/socket.c:2062 __sys_sendmsg+0xa3/0x120 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x27/0x40 net/socket.c:2103 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 RIP: 0033:0x7f39d481a0f9 RSP: 002b:00007f39d2d8c168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f39d4939f80 RCX: 00007f39d481a0f9 RDX: 0000000000000000 RSI: 0000000020002200 RDI: 0000000000000003 RBP: 00007f39d4875ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffde9f64adf R14: 00007f39d2d8c300 R15: 0000000000022000 Allocated by task 8008: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc+0x15a/0x400 mm/slab.c:3729 tipc_nameseq_create+0x53/0x290 net/tipc/name_table.c:152 tipc_nametbl_insert_publ+0xb37/0x14e0 net/tipc/name_table.c:476 tipc_nametbl_publish+0x211/0x3f0 net/tipc/name_table.c:701 tipc_sk_publish net/tipc/socket.c:2206 [inline] tipc_bind+0x2c4/0x600 net/tipc/socket.c:630 tipc_create_listen_sock net/tipc/server.c:338 [inline] tipc_open_listening_sock net/tipc/server.c:396 [inline] tipc_server_start+0x31f/0x880 net/tipc/server.c:611 tipc_topsrv_start net/tipc/subscr.c:382 [inline] tipc_topsrv_init_net+0x53b/0x730 net/tipc/subscr.c:397 ops_init+0xaa/0x3e0 net/core/net_namespace.c:118 setup_net+0x22f/0x530 net/core/net_namespace.c:298 copy_net_ns+0x19b/0x440 net/core/net_namespace.c:422 create_new_namespaces+0x375/0x720 kernel/nsproxy.c:107 unshare_nsproxy_namespaces+0xa1/0x1d0 kernel/nsproxy.c:206 SYSC_unshare kernel/fork.c:2413 [inline] SyS_unshare+0x308/0x7f0 kernel/fork.c:2363 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 Freed by task 6185: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 aa_free_task_context+0xda/0x130 security/apparmor/context.c:54 apparmor_cred_free+0x34/0x70 security/apparmor/lsm.c:58 security_cred_free+0x71/0xb0 security/security.c:1003 put_cred_rcu+0xe3/0x300 kernel/cred.c:117 __put_cred+0x1a1/0x210 kernel/cred.c:151 put_cred include/linux/cred.h:274 [inline] SYSC_faccessat fs/open.c:444 [inline] SyS_faccessat+0x52a/0x680 fs/open.c:353 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 The buggy address belongs to the object at ffff8880b60f4540 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 16 bytes inside of 32-byte region [ffff8880b60f4540, ffff8880b60f4560) The buggy address belongs to the page: page:ffffea0002d83d00 count:1 mapcount:0 mapping:ffff8880b60f4000 index:0xffff8880b60f4fc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffff8880b60f4000 ffff8880b60f4fc1 000000010000003e raw: ffffea0002bf1b20 ffffea0002ce2060 ffff88813fe741c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880b60f4400: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8880b60f4480: 00 05 fc fc fc fc fc fc 00 01 fc fc fc fc fc fc >ffff8880b60f4500: fb fb fb fb fc fc fc fc 00 00 fc fc fc fc fc fc ^ ffff8880b60f4580: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8880b60f4600: 00 01 fc fc fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================