Buffer I/O error on dev loop4, logical block 77, lost async page write attempt to access beyond end of device ====================================================== loop4: rw=2049, want=80, limit=64 WARNING: possible circular locking dependency detected 4.14.299-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.0/10075 is trying to acquire lock: (&ovl_i_mutex_dir_key[depth]#2){++++}, at: [] inode_lock_shared include/linux/fs.h:729 [inline] (&ovl_i_mutex_dir_key[depth]#2){++++}, at: [] lookup_slow+0x129/0x400 fs/namei.c:1674 but task is already holding lock: (&oi->lock){+.+.}, at: [] ovl_nlink_start+0x22f/0x460 fs/overlayfs/util.c:523 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 ( Buffer I/O error on dev loop4, logical block 79, lost async page write &oi->lock){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 ovl_copy_up_start+0x40/0xe0 fs/overlayfs/util.c:318 ovl_copy_up_one+0x21f/0x910 fs/overlayfs/copy_up.c:631 ovl_copy_up_flags+0xd5/0x120 fs/overlayfs/copy_up.c:686 ovl_rename+0x1a6/0xe50 fs/overlayfs/dir.c:943 attempt to access beyond end of device vfs_rename+0x560/0x1820 fs/namei.c:4498 SYSC_renameat2 fs/namei.c:4646 [inline] SyS_renameat2+0x95b/0xad0 fs/namei.c:4535 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 -> #1 (sb_writers#3 loop4: rw=2049, want=84, limit=64 ){.+.+}: 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 sb_start_write include/linux/fs.h:1551 [inline] mnt_want_write+0x3a/0xb0 fs/namespace.c:386 ovl_setattr+0x52/0x500 fs/overlayfs/inode.c:38 notify_change+0x56b/0xd10 fs/attr.c:315 attempt to access beyond end of device chmod_common+0x1af/0x390 fs/open.c:551 SYSC_fchmodat fs/open.c:584 [inline] SyS_fchmodat+0x9e/0x120 fs/open.c:576 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 -> #0 (&ovl_i_mutex_dir_key[depth]#2){++++}: lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 down_read+0x36/0x80 kernel/locking/rwsem.c:24 loop4: rw=2049, want=92, limit=64 inode_lock_shared include/linux/fs.h:729 [inline] lookup_slow+0x129/0x400 fs/namei.c:1674 lookup_one_len_unlocked+0x3a0/0x410 fs/namei.c:2595 ovl_lower_positive+0x184/0x350 fs/overlayfs/namei.c:783 ovl_rename+0x47c/0xe50 fs/overlayfs/dir.c:968 vfs_rename+0x560/0x1820 fs/namei.c:4498 attempt to access beyond end of device SYSC_renameat2 fs/namei.c:4646 [inline] SyS_renameat2+0x95b/0xad0 fs/namei.c:4535 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: loop4: rw=2049, want=97, limit=64 Chain exists of: &ovl_i_mutex_dir_key[depth]#2 --> sb_writers#3 --> &oi->lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&oi->lock); lock(sb_writers attempt to access beyond end of device #3); lock(&oi->lock); lock(&ovl_i_mutex_dir_key[depth]#2); *** DEADLOCK *** 8 locks held by syz-executor.0/10075: #0: (sb_writers loop4: rw=2049, want=102, limit=64 #13){.+.+}, at: [] sb_start_write include/linux/fs.h:1551 [inline] #13){.+.+}, at: [] mnt_want_write+0x3a/0xb0 fs/namespace.c:386 #1: (&type->s_vfs_rename_key#2){+.+.}, at: [] lock_rename+0x54/0x280 fs/namei.c:2889 #2: attempt to access beyond end of device (&ovl_i_mutex_dir_key[depth]#3/1){+.+.}, at: [] inode_lock_nested include/linux/fs.h:754 [inline] (&ovl_i_mutex_dir_key[depth]#3/1){+.+.}, at: [] lock_rename+0xa0/0x280 fs/namei.c:2893 #3: (&ovl_i_mutex_dir_key[depth] loop4: rw=2049, want=106, limit=64 #3/2){+.+.}, at: [] inode_lock_nested include/linux/fs.h:754 [inline] #3/2){+.+.}, at: [] lock_rename+0xd4/0x280 fs/namei.c:2894 #4: (&ovl_i_mutex_key[depth]){+.+.}, at: [] inode_lock include/linux/fs.h:719 [inline] #4: (&ovl_i_mutex_key[depth]){+.+.}, at: [] lock_two_nondirectories+0xca/0xf0 fs/inode.c:989 #5: (&ovl_i_mutex_key[depth]/4){+.+.}, at: [] inode_lock_nested include/linux/fs.h:754 [inline] #5: (&ovl_i_mutex_key[depth]/4){+.+.}, at: [] lock_two_nondirectories+0xb2/0xf0 fs/inode.c:991 #6: (sb_writers#3 attempt to access beyond end of device ){.+.+}, at: [] sb_start_write include/linux/fs.h:1551 [inline] ){.+.+}, at: [] mnt_want_write+0x3a/0xb0 fs/namespace.c:386 #7: (&oi->lock){+.+.}, at: [] ovl_nlink_start+0x22f/0x460 fs/overlayfs/util.c:523 stack backtrace: loop4: rw=2049, want=147, limit=64 CPU: 1 PID: 10075 Comm: syz-executor.0 Not tainted 4.14.299-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/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 attempt to access beyond end of device loop4: rw=2049, want=153, limit=64 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 attempt to access beyond end of device down_read+0x36/0x80 kernel/locking/rwsem.c:24 loop4: rw=2049, want=157, limit=64 inode_lock_shared include/linux/fs.h:729 [inline] lookup_slow+0x129/0x400 fs/namei.c:1674 attempt to access beyond end of device lookup_one_len_unlocked+0x3a0/0x410 fs/namei.c:2595 loop4: rw=2049, want=162, limit=64 ovl_lower_positive+0x184/0x350 fs/overlayfs/namei.c:783 ovl_rename+0x47c/0xe50 fs/overlayfs/dir.c:968 attempt to access beyond end of device loop4: rw=2049, want=169, limit=64 vfs_rename+0x560/0x1820 fs/namei.c:4498 attempt to access beyond end of device SYSC_renameat2 fs/namei.c:4646 [inline] SyS_renameat2+0x95b/0xad0 fs/namei.c:4535 loop4: rw=2049, want=176, limit=64 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 attempt to access beyond end of device entry_SYSCALL_64_after_hwframe+0x5e/0xd3 attempt to access beyond end of device loop4: rw=2049, want=183, limit=64 loop4: rw=2049, want=68, limit=64 attempt to access beyond end of device attempt to access beyond end of device loop4: rw=2049, want=186, limit=64 loop4: rw=2049, want=69, limit=64 attempt to access beyond end of device attempt to access beyond end of device loop4: rw=2049, want=190, limit=64 loop4: rw=2049, want=71, limit=64 attempt to access beyond end of device attempt to access beyond end of device loop4: rw=2049, want=192, limit=64 loop4: rw=2049, want=72, limit=64 attempt to access beyond end of device attempt to access beyond end of device loop4: rw=2049, want=193, limit=64 loop4: rw=2049, want=73, limit=64 attempt to access beyond end of device attempt to access beyond end of device loop4: rw=2049, want=194, limit=64 loop4: rw=2049, want=75, limit=64 attempt to access beyond end of device attempt to access beyond end of device loop4: rw=2049, want=195, limit=64 loop4: rw=2049, want=76, limit=64 attempt to access beyond end of device attempt to access beyond end of device loop4: rw=2049, want=196, limit=64 loop4: rw=2049, want=77, limit=64 attempt to access beyond end of device attempt to access beyond end of device loop4: rw=2049, want=79, limit=64 attempt to access beyond end of device loop4: rw=2049, want=81, limit=64 attempt to access beyond end of device loop4: rw=2049, want=202, limit=64 loop4: rw=2049, want=82, limit=64 attempt to access beyond end of device attempt to access beyond end of device loop4: rw=2049, want=205, limit=64 loop4: rw=2049, want=83, limit=64 attempt to access beyond end of device attempt to access beyond end of device loop4: rw=2049, want=206, limit=64 loop4: rw=2049, want=85, limit=64 attempt to access beyond end of device attempt to access beyond end of device loop4: rw=2049, want=207, limit=64 attempt to access beyond end of device loop4: rw=2049, want=209, limit=64 loop4: rw=2049, want=86, limit=64 attempt to access beyond end of device loop4: rw=2049, want=210, limit=64 attempt to access beyond end of device attempt to access beyond end of device loop4: rw=2049, want=212, limit=64 attempt to access beyond end of device loop4: rw=2049, want=214, limit=64 loop4: rw=2049, want=87, limit=64 attempt to access beyond end of device loop4: rw=2049, want=216, limit=64 attempt to access beyond end of device attempt to access beyond end of device loop4: rw=2049, want=217, limit=64 attempt to access beyond end of device loop4: rw=2049, want=219, limit=64 loop4: rw=2049, want=88, limit=64 attempt to access beyond end of device loop4: rw=2049, want=221, limit=64 attempt to access beyond end of device attempt to access beyond end of device loop4: rw=2049, want=223, limit=64 attempt to access beyond end of device loop4: rw=2049, want=89, limit=64 loop4: rw=2049, want=225, limit=64 attempt to access beyond end of device attempt to access beyond end of device loop4: rw=2049, want=90, limit=64 loop4: rw=2049, want=227, limit=64 attempt to access beyond end of device attempt to access beyond end of device loop4: rw=2049, want=229, limit=64 attempt to access beyond end of device loop4: rw=2049, want=91, limit=64 loop4: rw=2049, want=231, limit=64 attempt to access beyond end of device attempt to access beyond end of device loop4: rw=2049, want=233, limit=64 loop4: rw=2049, want=93, limit=64 attempt to access beyond end of device loop4: rw=2049, want=94, limit=64 attempt to access beyond end of device loop4: rw=2049, want=95, limit=64 attempt to access beyond end of device attempt to access beyond end of device loop4: rw=2049, want=235, limit=64 attempt to access beyond end of device loop4: rw=2049, want=96, limit=64 loop4: rw=2049, want=237, limit=64 attempt to access beyond end of device attempt to access beyond end of device loop4: rw=2049, want=239, limit=64 loop4: rw=2049, want=98, limit=64 attempt to access beyond end of device loop4: rw=2049, want=242, limit=64 attempt to access beyond end of device attempt to access beyond end of device loop4: rw=2049, want=243, limit=64 attempt to access beyond end of device loop4: rw=2049, want=99, limit=64 loop4: rw=2049, want=244, limit=64 attempt to access beyond end of device attempt to access beyond end of device loop4: rw=2049, want=260, limit=64 loop4: rw=2049, want=100, limit=64 attempt to access beyond end of device loop4: rw=2049, want=101, limit=64 attempt to access beyond end of device loop4: rw=2049, want=103, limit=64 attempt to access beyond end of device loop4: rw=2049, want=104, limit=64 attempt to access beyond end of device loop4: rw=2049, want=105, limit=64 attempt to access beyond end of device loop4: rw=2049, want=146, limit=64 attempt to access beyond end of device loop4: rw=2049, want=148, limit=64 attempt to access beyond end of device loop4: rw=2049, want=149, limit=64 attempt to access beyond end of device loop4: rw=2049, want=150, limit=64 attempt to access beyond end of device loop4: rw=2049, want=151, limit=64 attempt to access beyond end of device loop4: rw=2049, want=152, limit=64 attempt to access beyond end of device loop4: rw=2049, want=154, limit=64 attempt to access beyond end of device loop4: rw=2049, want=155, limit=64 attempt to access beyond end of device loop4: rw=2049, want=156, limit=64 attempt to access beyond end of device loop4: rw=2049, want=158, limit=64 attempt to access beyond end of device loop4: rw=2049, want=159, limit=64 attempt to access beyond end of device loop4: rw=2049, want=160, limit=64 attempt to access beyond end of device loop4: rw=2049, want=161, limit=64 attempt to access beyond end of device loop4: rw=2049, want=163, limit=64 attempt to access beyond end of device loop4: rw=2049, want=164, limit=64 attempt to access beyond end of device loop4: rw=2049, want=166, limit=64 attempt to access beyond end of device loop4: rw=2049, want=168, limit=64 attempt to access beyond end of device loop4: rw=2049, want=173, limit=64 attempt to access beyond end of device loop4: rw=2049, want=177, limit=64 attempt to access beyond end of device loop4: rw=2049, want=179, limit=64 attempt to access beyond end of device loop4: rw=2049, want=181, limit=64 attempt to access beyond end of device loop4: rw=2049, want=182, limit=64 attempt to access beyond end of device loop4: rw=2049, want=185, limit=64 attempt to access beyond end of device loop4: rw=2049, want=188, limit=64 attempt to access beyond end of device loop4: rw=2049, want=189, limit=64 attempt to access beyond end of device loop4: rw=2049, want=191, limit=64 attempt to access beyond end of device loop4: rw=2049, want=197, limit=64 attempt to access beyond end of device loop4: rw=2049, want=198, limit=64 attempt to access beyond end of device loop4: rw=2049, want=199, limit=64 attempt to access beyond end of device loop4: rw=2049, want=200, limit=64 attempt to access beyond end of device loop4: rw=2049, want=201, limit=64 attempt to access beyond end of device loop4: rw=2049, want=203, limit=64 attempt to access beyond end of device loop4: rw=2049, want=204, limit=64 attempt to access beyond end of device loop4: rw=2049, want=208, limit=64 attempt to access beyond end of device loop4: rw=2049, want=211, limit=64 attempt to access beyond end of device loop4: rw=2049, want=213, limit=64 attempt to access beyond end of device loop4: rw=2049, want=215, limit=64 attempt to access beyond end of device loop4: rw=2049, want=218, limit=64 attempt to access beyond end of device loop4: rw=2049, want=220, limit=64 attempt to access beyond end of device loop4: rw=2049, want=222, limit=64 attempt to access beyond end of device loop4: rw=2049, want=224, limit=64 attempt to access beyond end of device loop4: rw=2049, want=226, limit=64 attempt to access beyond end of device loop4: rw=2049, want=228, limit=64 attempt to access beyond end of device loop4: rw=2049, want=230, limit=64 attempt to access beyond end of device loop4: rw=2049, want=232, limit=64 attempt to access beyond end of device loop4: rw=2049, want=234, limit=64 attempt to access beyond end of device loop4: rw=2049, want=236, limit=64 attempt to access beyond end of device loop4: rw=2049, want=238, limit=64 attempt to access beyond end of device loop4: rw=2049, want=240, limit=64 attempt to access beyond end of device loop4: rw=2049, want=241, limit=64 attempt to access beyond end of device loop4: rw=1, want=165, limit=64 attempt to access beyond end of device audit: type=1107 audit(1668373482.720:3): pid=10114 uid=0 auid=4294967295 ses=4294967295 msg='Ƈidsھv|a·ަVrryq8򄊉#s KvHcV$ }A鍃sfǰi鍮_$)WK!R+}DojB⤆4WJc…d$%I^:sx k,ZG.- St奈[+e@m@Ӓ+օpe B5"؛"9hՉ'_33MVxjZ[Jj)_ ͡ Ɉsלwy l3iGG._ޚ2}f[uo!'!E:VD$3OJe_"j^9X xצo/<cڦ9ɲrOeZ[=9{]^yj :\=ÌoJB95^KW/fzF|S-E޿C^=ixT.Bqg)MZu ^)YI;ԝΊ$Zi z|d(][BpWZ= #ho'5j!ÌSSk("Vx(Y;1"=і-siYr loop4: rw=1, want=167, limit=64 attempt to access beyond end of device loop4: rw=1, want=170, limit=64 attempt to access beyond end of device loop4: rw=1, want=171, limit=64 attempt to access beyond end of device loop4: rw=1, want=172, limit=64 attempt to access beyond end of device loop4: rw=1, want=174, limit=64 attempt to access beyond end of device audit: type=1107 audit(1668373483.170:4): pid=10133 uid=0 auid=4294967295 ses=4294967295 msg='Ƈidsھv|a·ަVrryq8򄊉#s KvHcV$ }A鍃sfǰi鍮_$)WK!R+}DojB⤆4WJc…d$%I^:sx k,ZG.- St奈[+e@m@Ӓ+օpe B5"؛"9hՉ'_33MVxjZ[Jj)_ ͡ Ɉsלwy l3iGG._ޚ2}f[uo!'!E:VD$3OJe_"j^9X xצo/<cڦ9ɲrOeZ[=9{]^yj :\=ÌoJB95^KW/fzF|S-E޿C^=ixT.Bqg)MZu ^)YI;ԝΊ$Zi z|d(][BpWZ= #ho'5j!ÌSSk("Vx(Y;1"=і-siYr loop4: rw=1, want=175, limit=64 attempt to access beyond end of device loop4: rw=1, want=178, limit=64 UDF-fs: error (device loop4): udf_process_sequence: Block 99 of volume descriptor sequence is corrupted or we could not read it UDF-fs: error (device loop4): udf_process_sequence: Block 2016 of volume descriptor sequence is corrupted or we could not read it audit: type=1107 audit(1668373483.430:5): pid=10154 uid=0 auid=4294967295 ses=4294967295 msg='Ƈidsھv|a·ަVrryq8򄊉#s KvHcV$ }A鍃sfǰi鍮_$)WK!R+}DojB⤆4WJc…d$%I^:sx k,ZG.- St奈[+e@m@Ӓ+օpe B5"؛"9hՉ'_33MVxjZ[Jj)_ ͡ Ɉsלwy l3iGG._ޚ2}f[uo!'!E:VD$3OJe_"j^9X xצo/<cڦ9ɲrOeZ[=9{]^yj :\=ÌoJB95^KW/fzF|S-E޿C^=ixT.Bqg)MZu ^)YI;ԝΊ$Zi z|d(][BpWZ= #ho'5j!ÌSSk("Vx(Y;1"=і-siYr audit: type=1107 audit(1668373483.540:6): pid=10160 uid=0 auid=4294967295 ses=4294967295 msg='Ƈidsھv|a·ަVrryq8򄊉#s KvHcV$ }A鍃sfǰi鍮_$)WK!R+}DojB⤆4WJc…d$%I^:sx k,ZG.- St奈[+e@m@Ӓ+օpe B5"؛"9hՉ'_33MVxjZ[Jj)_ ͡ Ɉsלwy l3iGG._ޚ2}f[uo!'!E:VD$3OJe_"j^9X xצo/<cڦ9ɲrOeZ[=9{]^yj :\=ÌoJB95^KW/fzF|S-E޿C^=ixT.Bqg)MZu ^)YI;ԝΊ$Zi z|d(][BpWZ= #ho'5j!ÌSSk("Vx(Y;1"=і-siYr audit: type=1107 audit(1668373483.580:7): pid=10167 uid=0 auid=4294967295 ses=4294967295 msg='Ƈidsھv|a·ަVrryq8򄊉#s KvHcV$ }A鍃sfǰi鍮_$)WK!R+}DojB⤆4WJc…d$%I^:sx k,ZG.- St奈[+e@m@Ӓ+օpe B5"؛"9hՉ'_33MVxjZ[Jj)_ ͡ Ɉsלwy l3iGG._ޚ2}f[uo!'!E:VD$3OJe_"j^9X xצo/<cڦ9ɲrOeZ[=9{]^yj :\=ÌoJB95^KW/fzF|S-E޿C^=ixT.Bqg)MZu ^)YI;ԝΊ$Zi z|d(][BpWZ= #ho'5j!ÌSSk("Vx(Y;1"=і-siYr audit: type=1107 audit(1668373484.280:8): pid=10214 uid=0 auid=4294967295 ses=4294967295 msg='Ƈidsھv|a·ަVrryq8򄊉#s KvHcV$ }A鍃sfǰi鍮_$)WK!R+}DojB⤆4WJc…d$%I^:sx k,ZG.- St奈[+e@m@Ӓ+օpe B5"؛"9hՉ'_33MVxjZ[Jj)_ ͡ Ɉsלwy l3iGG._ޚ2}f[uo!'!E:VD$3OJe_"j^9X xצo/<cڦ9ɲrOeZ[=9{]^yj :\=ÌoJB95^KW/fzF|S-E޿C^=ixT.Bqg)MZu ^)YI;ԝΊ$Zi z|d(][BpWZ= #ho'5j!ÌSSk("Vx(Y;1"=і-siYr audit: type=1107 audit(1668373484.520:9): pid=10234 uid=0 auid=4294967295 ses=4294967295 msg='Ƈidsھv|a·ަVrryq8򄊉#s KvHcV$ }A鍃sfǰi鍮_$)WK!R+}DojB⤆4WJc…d$%I^:sx k,ZG.- St奈[+e@m@Ӓ+օpe B5"؛"9hՉ'_33MVxjZ[Jj)_ ͡ Ɉsלwy l3iGG._ޚ2}f[uo!'!E:VD$3OJe_"j^9X xצo/<cڦ9ɲrOeZ[=9{]^yj :\=ÌoJB95^KW/fzF|S-E޿C^=ixT.Bqg)MZu ^)YI;ԝΊ$Zi z|d(][BpWZ= #ho'5j!ÌSSk("Vx(Y;1"=і-siYr audit: type=1800 audit(1668373484.710:10): pid=10245 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.4" name="file0" dev="sda1" ino=13982 res=0 audit: type=1804 audit(1668373484.710:11): pid=10245 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.4" name="/root/syzkaller-testdir1948407157/syzkaller.6FMYhn/24/file0" dev="sda1" ino=13982 res=1 audit: type=1804 audit(1668373484.710:12): pid=10245 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.4" name="/root/syzkaller-testdir1948407157/syzkaller.6FMYhn/24/file0" dev="sda1" ino=13982 res=1 unregister_netdevice: waiting for ip6gre0 to become free. Usage count = -1 audit: type=1800 audit(1668373487.480:13): pid=10308 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.1" name="file0" dev="sda1" ino=13989 res=0 x_tables: ip_tables: icmp match: only valid for protocol 1 audit: type=1800 audit(1668373487.620:14): pid=10309 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.3" name="file0" dev="sda1" ino=13990 res=0 audit: type=1800 audit(1668373487.620:15): pid=10310 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.4" name="file0" dev="sda1" ino=13991 res=0