WARNING: the mand mount option is being deprecated and will be removed in v5.15! ====================================================== block nbd2: shutting down sockets ====================================================== WARNING: possible circular locking dependency detected 4.14.307-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.2/9927 is trying to acquire lock: (&bdev->bd_mutex){+.+.}, at: [] blkdev_reread_part+0x1b/0x40 block/ioctl.c:192 but task is already holding lock: (&nbd->config_lock){+.+.}, at: [] nbd_ioctl+0x11f/0xad0 drivers/block/nbd.c:1369 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&nbd->config_lock){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 nbd_open+0x1ac/0x370 drivers/block/nbd.c:1422 __blkdev_get+0x306/0x1090 fs/block_dev.c:1470 blkdev_get+0x88/0x890 fs/block_dev.c:1611 blkdev_open+0x1cc/0x250 fs/block_dev.c:1772 do_dentry_open+0x44b/0xec0 fs/open.c:777 vfs_open+0x105/0x220 fs/open.c:888 do_last fs/namei.c:3428 [inline] path_openat+0x628/0x2970 fs/namei.c:3571 do_filp_open+0x179/0x3c0 fs/namei.c:3605 do_sys_open+0x296/0x410 fs/open.c:1081 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 -> #1 (nbd_index_mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 nbd_open+0x1e/0x370 drivers/block/nbd.c:1409 __blkdev_get+0x306/0x1090 fs/block_dev.c:1470 blkdev_get+0x88/0x890 fs/block_dev.c:1611 blkdev_open+0x1cc/0x250 fs/block_dev.c:1772 do_dentry_open+0x44b/0xec0 fs/open.c:777 vfs_open+0x105/0x220 fs/open.c:888 do_last fs/namei.c:3428 [inline] path_openat+0x628/0x2970 fs/namei.c:3571 do_filp_open+0x179/0x3c0 fs/namei.c:3605 do_sys_open+0x296/0x410 fs/open.c:1081 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 -> #0 (&bdev->bd_mutex){+.+.}: lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 blkdev_reread_part+0x1b/0x40 block/ioctl.c:192 nbd_bdev_reset drivers/block/nbd.c:1076 [inline] nbd_clear_sock_ioctl drivers/block/nbd.c:1282 [inline] __nbd_ioctl drivers/block/nbd.c:1306 [inline] nbd_ioctl+0x802/0xad0 drivers/block/nbd.c:1376 __blkdev_driver_ioctl block/ioctl.c:297 [inline] blkdev_ioctl+0x540/0x1830 block/ioctl.c:594 block_ioctl+0xd9/0x120 fs/block_dev.c:1893 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: &bdev->bd_mutex --> nbd_index_mutex --> &nbd->config_lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&nbd->config_lock); lock(nbd_index_mutex); lock(&nbd->config_lock); lock(&bdev->bd_mutex); *** DEADLOCK *** 1 lock held by syz-executor.2/9927: #0: (&nbd->config_lock){+.+.}, at: [] nbd_ioctl+0x11f/0xad0 drivers/block/nbd.c:1369 stack backtrace: CPU: 1 PID: 9927 Comm: syz-executor.2 Not tainted 4.14.307-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/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 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 blkdev_reread_part+0x1b/0x40 block/ioctl.c:192 nbd_bdev_reset drivers/block/nbd.c:1076 [inline] nbd_clear_sock_ioctl drivers/block/nbd.c:1282 [inline] __nbd_ioctl drivers/block/nbd.c:1306 [inline] nbd_ioctl+0x802/0xad0 drivers/block/nbd.c:1376 __blkdev_driver_ioctl block/ioctl.c:297 [inline] blkdev_ioctl+0x540/0x1830 block/ioctl.c:594 block_ioctl+0xd9/0x120 fs/block_dev.c:1893 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:0x7f6cb6c7a0f9 RSP: 002b:00007f6cb51cb168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f6cb6d9a050 RCX: 00007f6cb6c7a0f9 RDX: 0000000000000000 RSI: 000000000000ab04 RDI: 0000000000000004 RBP: 00007f6cb6cd5ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff99746f4f R14: 00007f6cb51cb300 R15: 0000000000022000 EXT4-fs (loop0): revision level too high, forcing read-only mode EXT4-fs (loop0): orphan cleanup on readonly fs EXT4-fs warning (device loop0): ext4_enable_quotas:5780: Failed to enable quota tracking (type=-1, err=-22). Please run e2fsck to fix. EXT4-fs (loop0): Cannot turn on quotas: error -22 EXT4-fs (loop0): 1 truncate cleaned up EXT4-fs (loop0): mounted filesystem without journal. Opts: nobarrier,noblock_validity,lazytime,barrier=0x000000007fff0038,errors=remount-ro,resgid=0x0000000000000000,errors=remount-ro,resgid=0x0000000000000000,resgid=0x000000000000ee002 EXT4-fs (loop0): revision level too high, forcing read-only mode EXT4-fs (loop0): orphan cleanup on readonly fs EXT4-fs (loop2): Journaled quota options ignored when QUOTA feature is enabled EXT4-fs warning (device loop0): ext4_enable_quotas:5780: Failed to enable quota tracking (type=-1, err=-22). Please run e2fsck to fix. EXT4-fs (loop5): ext4_check_descriptors: Inode bitmap for group 0 not in group (block 2147483647)! EXT4-fs (loop0): Cannot turn on quotas: error -22 EXT4-fs (loop2): Ignoring removed mblk_io_submit option EXT4-fs (loop0): 1 truncate cleaned up EXT4-fs (loop5): group descriptors corrupted! EXT4-fs (loop0): mounted filesystem without journal. Opts: nobarrier,noblock_validity,lazytime,barrier=0x000000007fff0038,errors=remount-ro,resgid=0x0000000000000000,errors=remount-ro,resgid=0x0000000000000000,resgid=0x000000000000ee002 EXT4-fs (loop2): Unsupported blocksize for fs encryption print_req_error: I/O error, dev loop5, sector 24 FAT-fs (loop1): Unrecognized mount option "erro" or missing value netlink: 44 bytes leftover after parsing attributes in process `syz-executor.1'. EXT4-fs (loop0): revision level too high, forcing read-only mode EXT4-fs (loop0): orphan cleanup on readonly fs print_req_error: I/O error, dev loop5, sector 0 EXT4-fs (loop1): orphan cleanup on readonly fs EXT4-fs error (device loop1): ext4_mb_generate_buddy:754: group 0, block bitmap and bg descriptor inconsistent: 32 vs 41 free clusters EXT4-fs warning (device loop0): ext4_enable_quotas:5780: Failed to enable quota tracking (type=-1, err=-22). Please run e2fsck to fix. EXT4-fs (loop1): Remounting filesystem read-only EXT4-fs (loop1): 1 orphan inode deleted EXT4-fs (loop1): mounting with "discard" option, but the device does not support discard EXT4-fs (loop0): Cannot turn on quotas: error -22 EXT4-fs (loop1): mounted filesystem without journal. Opts: errors=remount-ro,sysvgroups,nolazytime,resuid=0x0000000000000000,data_err=abort,resgid=0x0000000000000000,bsddf,discard,usrquota, EXT4-fs (loop0): 1 truncate cleaned up EXT4-fs (loop0): mounted filesystem without journal. Opts: nobarrier,noblock_validity,lazytime,barrier=0x000000007fff0038,errors=remount-ro,resgid=0x0000000000000000,errors=remount-ro,resgid=0x0000000000000000,resgid=0x000000000000ee002 EXT4-fs (loop1): orphan cleanup on readonly fs print_req_error: I/O error, dev loop5, sector 0 EXT4-fs error (device loop1): ext4_mb_generate_buddy:754: group 0, block bitmap and bg descriptor inconsistent: 32 vs 41 free clusters EXT4-fs (loop0): revision level too high, forcing read-only mode EXT4-fs (loop1): Remounting filesystem read-only EXT4-fs (loop0): orphan cleanup on readonly fs EXT4-fs warning (device loop0): ext4_enable_quotas:5780: Failed to enable quota tracking (type=-1, err=-22). Please run e2fsck to fix. EXT4-fs (loop1): 1 orphan inode deleted EXT4-fs (loop1): mounting with "discard" option, but the device does not support discard EXT4-fs (loop0): Cannot turn on quotas: error -22 EXT4-fs (loop0): 1 truncate cleaned up EXT4-fs (loop0): mounted filesystem without journal. Opts: nobarrier,noblock_validity,lazytime,barrier=0x000000007fff0038,errors=remount-ro,resgid=0x0000000000000000,errors=remount-ro,resgid=0x0000000000000000,resgid=0x000000000000ee002 EXT4-fs (loop1): mounted filesystem without journal. Opts: errors=remount-ro,sysvgroups,nolazytime,resuid=0x0000000000000000,data_err=abort,resgid=0x0000000000000000,bsddf,discard,usrquota, EXT4-fs (loop4): Unsupported blocksize for fs encryption EXT4-fs (loop1): orphan cleanup on readonly fs print_req_error: I/O error, dev loop4, sector 0 Buffer I/O error on dev loop4, logical block 0, async page read print_req_error: I/O error, dev loop4, sector 6 EXT4-fs error (device loop5) in ext4_do_update_inode:5315: error 27 Buffer I/O error on dev loop4, logical block 3, async page read __quota_error: 41 callbacks suppressed Quota error (device loop1): find_tree_dqentry: Getting block too big (4294934528 >= 6) EXT4-fs (loop5): Remounting filesystem read-only Quota error (device loop1): qtree_read_dquot: Can't read quota structure for id 0 EXT4-fs error (device loop5) in ext4_do_update_inode:5315: error 27 Quota error (device loop5): write_blk: dquota write failed Quota error (device loop5): qtree_write_dquot: Error -27 occurred while creating quota Quota error (device loop1): find_tree_dqentry: Getting block too big (4294934528 >= 6) EXT4-fs (loop5): 1 truncate cleaned up Quota error (device loop1): qtree_read_dquot: Can't read quota structure for id 0 EXT4-fs (loop5): mounted filesystem without journal. Opts: nobarrier,noblock_validity,lazytime,barrier=0x000000007fff0038,errors=remount-ro,resgid=0x0000000000000000,errors=remount-ro,resgid=0x0000000000000000,resgid=0x000000000000ee002 EXT4-fs error (device loop1): ext4_mb_generate_buddy:754: group 0, block bitmap and bg descriptor inconsistent: 32 vs 41 free clusters syz-executor.5 (10260) used greatest stack depth: 24600 bytes left EXT4-fs (loop1): Remounting filesystem read-only EXT4-fs (loop1): 1 orphan inode deleted EXT4-fs (loop1): mounting with "discard" option, but the device does not support discard EXT4-fs (loop1): mounted filesystem without journal. Opts: errors=remount-ro,sysvgroups,nolazytime,resuid=0x0000000000000000,data_err=abort,resgid=0x0000000000000000,bsddf,discard,usrquota, EXT4-fs (loop1): orphan cleanup on readonly fs Quota error (device loop1): find_tree_dqentry: Getting block too big (4294934528 >= 6) EXT4-fs error (device loop5) in ext4_do_update_inode:5315: error 27 EXT4-fs (loop5): Remounting filesystem read-only EXT4-fs error (device loop5) in ext4_do_update_inode:5315: error 27 Quota error (device loop1): qtree_read_dquot: Can't read quota structure for id 0 FAT-fs (loop4): Volume was not properly unmounted. Some data may be corrupt. Please run fsck. Quota error (device loop5): write_blk: dquota write failed Quota error (device loop1): find_tree_dqentry: Getting block too big (4294934528 >= 6) EXT4-fs (loop5): 1 truncate cleaned up EXT4-fs (loop5): mounted filesystem without journal. Opts: nobarrier,noblock_validity,lazytime,barrier=0x000000007fff0038,errors=remount-ro,resgid=0x0000000000000000,errors=remount-ro,resgid=0x0000000000000000,resgid=0x000000000000ee002 EXT4-fs error (device loop1): ext4_mb_generate_buddy:754: group 0, block bitmap and bg descriptor inconsistent: 32 vs 41 free clusters EXT4-fs (loop1): Remounting filesystem read-only EXT4-fs (loop1): 1 orphan inode deleted EXT4-fs (loop1): mounting with "discard" option, but the device does not support discard EXT4-fs (loop1): mounted filesystem without journal. Opts: errors=remount-ro,sysvgroups,nolazytime,resuid=0x0000000000000000,data_err=abort,resgid=0x0000000000000000,bsddf,discard,usrquota, EXT4-fs error (device loop0): ext4_ext_check_inode:510: inode #11: comm syz-executor.0: pblk 0 bad header/extent: invalid extent entries - magic f30a, entries 1, max 4(4), depth 0(0) EXT4-fs (loop0): Remounting filesystem read-only EXT4-fs error (device loop0): ext4_orphan_get:1244: comm syz-executor.0: couldn't read orphan inode 11 (err -117) EXT4-fs (loop0): mounted filesystem without journal. Opts: nobarrier,noblock_validity,lazytime,barrier=0x000000007fff0038,errors=remount-ro,resgid=0x0000000000000000,errors=remount-ro,resgid=0x0000000000000000,resgid=0x000000000000ee002 EXT4-fs error (device loop5) in ext4_do_update_inode:5315: error 27 EXT4-fs (loop5): Remounting filesystem read-only EXT4-fs error (device loop5) in ext4_do_update_inode:5315: error 27 EXT4-fs (loop5): 1 truncate cleaned up EXT4-fs (loop5): mounted filesystem without journal. Opts: nobarrier,noblock_validity,lazytime,barrier=0x000000007fff0038,errors=remount-ro,resgid=0x0000000000000000,errors=remount-ro,resgid=0x0000000000000000,resgid=0x000000000000ee002 EXT4-fs error (device loop5) in ext4_do_update_inode:5315: error 27 EXT4-fs (loop5): Remounting filesystem read-only EXT4-fs error (device loop5) in ext4_do_update_inode:5315: error 27 EXT4-fs (loop5): 1 truncate cleaned up EXT4-fs (loop5): mounted filesystem without journal. Opts: nobarrier,noblock_validity,lazytime,barrier=0x000000007fff0038,errors=remount-ro,resgid=0x0000000000000000,errors=remount-ro,resgid=0x0000000000000000,resgid=0x000000000000ee002 XFS (loop2): Mounting V4 Filesystem XFS (loop2): Ending clean mount XFS (loop2): Unmounting Filesystem netlink: 44 bytes leftover after parsing attributes in process `syz-executor.2'. L1TF CPU bug present and SMT on, data leak possible. See CVE-2018-3646 and https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/l1tf.html for details. ================================================================== 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 ffff8880ae501810 by task syz-executor.3/10864 CPU: 0 PID: 10864 Comm: syz-executor.3 Not tainted 4.14.307-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/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:0x7fa9f4b020f9 RSP: 002b:00007fa9f3074168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fa9f4c21f80 RCX: 00007fa9f4b020f9 RDX: 0000000000000000 RSI: 0000000020000000 RDI: 0000000000000003 RBP: 00007fa9f4b5dae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc266d6f1f R14: 00007fa9f3074300 R15: 0000000000022000 Allocated by task 8011: 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 4759: 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 __rcu_reclaim kernel/rcu/rcu.h:195 [inline] rcu_do_batch kernel/rcu/tree.c:2699 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2962 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2929 [inline] rcu_process_callbacks+0x780/0x1180 kernel/rcu/tree.c:2946 __do_softirq+0x24d/0x9ff kernel/softirq.c:288 The buggy address belongs to the object at ffff8880ae501800 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 16 bytes inside of 32-byte region [ffff8880ae501800, ffff8880ae501820) The buggy address belongs to the page: page:ffffea0002b94040 count:1 mapcount:0 mapping:ffff8880ae501000 index:0xffff8880ae501fc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffff8880ae501000 ffff8880ae501fc1 000000010000003d raw: ffffea0002ccf820 ffffea0002972960 ffff88813fe741c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880ae501700: fb fb fb fb fc fc fc fc 00 fc fc fc fc fc fc fc ffff8880ae501780: 00 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc >ffff8880ae501800: 00 00 fc fc fc fc fc fc 05 fc fc fc fc fc fc fc ^ ffff8880ae501880: 00 00 fc fc fc fc fc fc 05 fc fc fc fc fc fc fc ffff8880ae501900: 00 fc fc fc fc fc fc fc 00 fc fc fc fc fc fc fc ==================================================================