====================================================== WARNING: possible circular locking dependency detected 4.14.289-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.2/9640 is trying to acquire lock: (sb_writers#6){.+.+}, at: [] file_start_write include/linux/fs.h:2714 [inline] (sb_writers#6){.+.+}, at: [] vfs_fallocate+0x5c1/0x790 fs/open.c:318 but task is already holding lock: (ashmem_mutex){+.+.}, at: [] ashmem_shrink_scan drivers/staging/android/ashmem.c:494 [inline] (ashmem_mutex){+.+.}, at: [] ashmem_ioctl+0x27e/0xd00 drivers/staging/android/ashmem.c:843 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (ashmem_mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 ashmem_mmap+0x50/0x5c0 drivers/staging/android/ashmem.c:393 call_mmap include/linux/fs.h:1785 [inline] mmap_region+0xa1a/0x1220 mm/mmap.c:1717 do_mmap+0x5b3/0xcb0 mm/mmap.c:1495 do_mmap_pgoff include/linux/mm.h:2187 [inline] vm_mmap_pgoff+0x14e/0x1a0 mm/util.c:366 SYSC_mmap_pgoff mm/mmap.c:1545 [inline] SyS_mmap_pgoff+0x249/0x510 mm/mmap.c:1503 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb -> #2 (&mm->mmap_sem){++++}: __might_fault mm/memory.c:4705 [inline] __might_fault+0x137/0x1b0 mm/memory.c:4690 _copy_to_user+0x27/0xd0 lib/usercopy.c:25 copy_to_user include/linux/uaccess.h:155 [inline] filldir+0x1d5/0x390 fs/readdir.c:237 dir_emit_dot include/linux/fs.h:3361 [inline] dir_emit_dots include/linux/fs.h:3372 [inline] dcache_readdir+0x180/0x860 fs/libfs.c:192 iterate_dir+0x1a0/0x5e0 fs/readdir.c:52 SYSC_getdents fs/readdir.c:272 [inline] SyS_getdents+0x125/0x240 fs/readdir.c:253 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb -> #1 (&type->i_mutex_dir_key#5){++++}: down_write+0x34/0x90 kernel/locking/rwsem.c:54 inode_lock include/linux/fs.h:719 [inline] do_last fs/namei.c:3331 [inline] path_openat+0xde2/0x2970 fs/namei.c:3569 do_filp_open+0x179/0x3c0 fs/namei.c:3603 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+0x46/0xbb -> #0 (sb_writers#6){.+.+}: lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 percpu_down_read_preempt_disable include/linux/percpu-rwsem.h:36 [inline] percpu_down_read include/linux/percpu-rwsem.h:59 [inline] __sb_start_write+0x64/0x260 fs/super.c:1342 file_start_write include/linux/fs.h:2714 [inline] vfs_fallocate+0x5c1/0x790 fs/open.c:318 ashmem_shrink_scan.part.0+0x135/0x3d0 drivers/staging/android/ashmem.c:501 ashmem_shrink_scan drivers/staging/android/ashmem.c:494 [inline] ashmem_ioctl+0x294/0xd00 drivers/staging/android/ashmem.c:843 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+0x46/0xbb other info that might help us debug this: Chain exists of: sb_writers#6 --> &mm->mmap_sem --> ashmem_mutex syz-executor.1 (9631) used greatest stack depth: 24896 bytes left Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(ashmem_mutex); lock(&mm->mmap_sem); lock(ashmem_mutex); lock(sb_writers#6); *** DEADLOCK *** 1 lock held by syz-executor.2/9640: #0: (ashmem_mutex){+.+.}, at: [] ashmem_shrink_scan drivers/staging/android/ashmem.c:494 [inline] #0: (ashmem_mutex){+.+.}, at: [] ashmem_ioctl+0x27e/0xd00 drivers/staging/android/ashmem.c:843 stack backtrace: CPU: 0 PID: 9640 Comm: syz-executor.2 Not tainted 4.14.289-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022 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 percpu_down_read_preempt_disable include/linux/percpu-rwsem.h:36 [inline] percpu_down_read include/linux/percpu-rwsem.h:59 [inline] __sb_start_write+0x64/0x260 fs/super.c:1342 file_start_write include/linux/fs.h:2714 [inline] vfs_fallocate+0x5c1/0x790 fs/open.c:318 ashmem_shrink_scan.part.0+0x135/0x3d0 drivers/staging/android/ashmem.c:501 ashmem_shrink_scan drivers/staging/android/ashmem.c:494 [inline] ashmem_ioctl+0x294/0xd00 drivers/staging/android/ashmem.c:843 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+0x46/0xbb RIP: 0033:0x7f08e83e8209 RSP: 002b:00007f08e6d5d168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f08e84faf60 RCX: 00007f08e83e8209 RDX: 0000000000000000 RSI: 000000000000770a RDI: 0000000000000004 RBP: 00007f08e8442161 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffee0b1c2af R14: 00007f08e6d5d300 R15: 0000000000022000 print_req_error: I/O error, dev loop7, sector 280 Buffer I/O error on dev loop7, logical block 35, lost async page write EXT4-fs (loop3): ext4_check_descriptors: Checksum for group 0 failed (60935!=0) EXT4-fs (loop3): orphan cleanup on readonly fs Quota error (device loop3): v2_read_header: Failed header read: expected=8 got=0 EXT4-fs error (device loop3): ext4_free_inode:286: comm syz-executor.3: reserved or nonexistent inode 3 EXT4-fs (loop3): Remounting filesystem read-only EXT4-fs warning (device loop3): ext4_enable_quotas:5779: Failed to enable quota tracking (type=-1, err=-22). Please run e2fsck to fix. EXT4-fs (loop3): Cannot turn on quotas: error -22 print_req_error: I/O error, dev loop7, sector 72 Buffer I/O error on dev loop7, logical block 9, lost async page write EXT4-fs (loop3): mounted filesystem without journal. Opts: errors=remount-ro, EXT4-fs (loop3): ext4_check_descriptors: Checksum for group 0 failed (60935!=0) ====================================================== WARNING: the mand mount option is being deprecated and will be removed in v5.15! ====================================================== print_req_error: I/O error, dev loop7, sector 176 Buffer I/O error on dev loop7, logical block 22, lost async page write EXT4-fs (loop3): orphan cleanup on readonly fs Quota error (device loop3): v2_read_header: Failed header read: expected=8 got=0 EXT4-fs error (device loop3): ext4_free_inode:286: comm syz-executor.3: reserved or nonexistent inode 3 EXT4-fs (loop3): Remounting filesystem read-only EXT4-fs warning (device loop3): ext4_enable_quotas:5779: Failed to enable quota tracking (type=-1, err=-22). Please run e2fsck to fix. EXT4-fs (loop3): Cannot turn on quotas: error -22 EXT4-fs (loop3): mounted filesystem without journal. Opts: errors=remount-ro, ip_tables: iptables: counters copy to user failed while replacing table ip_tables: iptables: counters copy to user failed while replacing table EXT4-fs (loop3): ext4_check_descriptors: Checksum for group 0 failed (60935!=0) print_req_error: I/O error, dev loop7, sector 256 Buffer I/O error on dev loop7, logical block 32, lost async page write EXT4-fs (loop3): orphan cleanup on readonly fs ip_tables: iptables: counters copy to user failed while replacing table ip_tables: iptables: counters copy to user failed while replacing table Quota error (device loop3): v2_read_header: Failed header read: expected=8 got=0 EXT4-fs error (device loop3): ext4_free_inode:286: comm syz-executor.3: reserved or nonexistent inode 3 EXT4-fs (loop3): Remounting filesystem read-only EXT4-fs warning (device loop3): ext4_enable_quotas:5779: Failed to enable quota tracking (type=-1, err=-22). Please run e2fsck to fix. EXT4-fs (loop3): Cannot turn on quotas: error -22 EXT4-fs (loop3): mounted filesystem without journal. Opts: errors=remount-ro, ip_tables: iptables: counters copy to user failed while replacing table ip_tables: iptables: counters copy to user failed while replacing table ip_tables: iptables: counters copy to user failed while replacing table ip_tables: iptables: counters copy to user failed while replacing table ip_tables: iptables: counters copy to user failed while replacing table ip_tables: iptables: counters copy to user failed while replacing table 8021q: adding VLAN 0 to HW filter on device team0 Zero length message leads to an empty skb bond0: Enslaving team0 as an active interface with an up link bond0: Releasing backup interface team0 bridge0: port 3(team0) entered blocking state bridge0: port 3(team0) entered disabled state device team0 entered promiscuous mode device team_slave_0 entered promiscuous mode device team_slave_1 entered promiscuous mode syz-executor.1 (9903) used greatest stack depth: 23720 bytes left device team0 left promiscuous mode device team_slave_0 left promiscuous mode device team_slave_1 left promiscuous mode bridge0: port 3(team0) entered disabled state 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. 8021q: adding VLAN 0 to HW filter on device team0 bond0: Enslaving team0 as an active interface with an up link 8021q: adding VLAN 0 to HW filter on device team0 bond0: Enslaving team0 as an active interface with an up link bond0: Releasing backup interface team0 bridge0: port 3(team0) entered blocking state bridge0: port 3(team0) entered disabled state device team0 entered promiscuous mode device team_slave_0 entered promiscuous mode device team_slave_1 entered promiscuous mode bond0: Releasing backup interface team0 bridge0: port 3(team0) entered blocking state bridge0: port 3(team0) entered disabled state device team0 entered promiscuous mode device team_slave_0 entered promiscuous mode device team_slave_1 entered promiscuous mode device team0 left promiscuous mode audit: type=1804 audit(1658837997.945:2): pid=10005 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.4" name="/root/syzkaller-testdir1374235350/syzkaller.G6jfdq/23/file0/bus" dev="ramfs" ino=30750 res=1 device team_slave_0 left promiscuous mode device team_slave_1 left promiscuous mode bridge0: port 3(team0) entered disabled state audit: type=1804 audit(1658837998.115:3): pid=10027 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.4" name="/root/syzkaller-testdir1374235350/syzkaller.G6jfdq/24/file0/bus" dev="ramfs" ino=29861 res=1 8021q: adding VLAN 0 to HW filter on device team0 bond0: Enslaving team0 as an active interface with an up link device team0 left promiscuous mode device team_slave_0 left promiscuous mode device team_slave_1 left promiscuous mode bridge0: port 3(team0) entered disabled state 8021q: adding VLAN 0 to HW filter on device team0 bond0: Enslaving team0 as an active interface with an up link bond0: Releasing backup interface team0 bridge0: port 3(team0) entered blocking state bridge0: port 3(team0) entered disabled state device team0 entered promiscuous mode device team_slave_0 entered promiscuous mode device team_slave_1 entered promiscuous mode bond0: Releasing backup interface team0 bridge0: port 3(team0) entered blocking state bridge0: port 3(team0) entered disabled state device team0 entered promiscuous mode device team_slave_0 entered promiscuous mode device team_slave_1 entered promiscuous mode device team0 left promiscuous mode audit: type=1804 audit(1658837998.685:4): pid=10047 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.3" name="/root/syzkaller-testdir1602107598/syzkaller.hWJES6/24/file0/bus" dev="ramfs" ino=30782 res=1 device team_slave_0 left promiscuous mode device team_slave_1 left promiscuous mode bridge0: port 3(team0) entered disabled state audit: type=1804 audit(1658837998.725:5): pid=10046 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.4" name="/root/syzkaller-testdir1374235350/syzkaller.G6jfdq/25/file0/bus" dev="ramfs" ino=29887 res=1 8021q: adding VLAN 0 to HW filter on device team0 audit: type=1804 audit(1658837998.875:6): pid=10062 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.3" name="/root/syzkaller-testdir1602107598/syzkaller.hWJES6/25/file0/bus" dev="ramfs" ino=30835 res=1 bond0: Enslaving team0 as an active interface with an up link device team0 left promiscuous mode device team_slave_0 left promiscuous mode device team_slave_1 left promiscuous mode bridge0: port 3(team0) entered disabled state 8021q: adding VLAN 0 to HW filter on device team0 bond0: Enslaving team0 as an active interface with an up link audit: type=1804 audit(1658837999.075:7): pid=10068 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.4" name="/root/syzkaller-testdir1374235350/syzkaller.G6jfdq/26/file0/bus" dev="ramfs" ino=29899 res=1 bond0: Releasing backup interface team0 bridge0: port 3(team0) entered blocking state bridge0: port 3(team0) entered disabled state device team0 entered promiscuous mode device team_slave_0 entered promiscuous mode device team_slave_1 entered promiscuous mode audit: type=1804 audit(1658837999.725:8): pid=10080 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.3" name="/root/syzkaller-testdir1602107598/syzkaller.hWJES6/26/file0/bus" dev="ramfs" ino=30857 res=1 bond0: Releasing backup interface team0 bridge0: port 3(team0) entered blocking state bridge0: port 3(team0) entered disabled state device team0 entered promiscuous mode device team_slave_0 entered promiscuous mode device team_slave_1 entered promiscuous mode EXT4-fs warning (device sda1): ext4_group_add:1668: No reserved GDT blocks, can't resize