[v5.15] WARNING in ovl_encode_real_fh

4 views
Skip to first unread message

syzbot

unread,
Nov 30, 2024, 4:34:29 PM11/30/24
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 0a51d2d4527b Linux 5.15.173
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1147f9e8580000
kernel config: https://syzkaller.appspot.com/x/.config?x=48dad5136d11d5fc
dashboard link: https://syzkaller.appspot.com/bug?extid=fc4fdd387034eb85497f
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/df502ed32946/disk-0a51d2d4.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/a6f49f24ceaa/vmlinux-0a51d2d4.xz
kernel image: https://storage.googleapis.com/syzbot-assets/f45db4b68abf/bzImage-0a51d2d4.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+fc4fdd...@syzkaller.appspotmail.com

RAX: ffffffffffffffda RBX: 00007fbec724e160 RCX: 00007fbec7088849
RDX: 0000000020000000 RSI: 0000000020000040 RDI: 0000000020000140
RBP: 00007fbec4ebc0a0 R08: 0000000000000000 R09: 0000000000000000
R10: 000000000000001c R11: 0000000000000246 R12: 0000000000000002
R13: 0000000000000000 R14: 00007fbec724e160 R15: 00007fffb8112a18
</TASK>
------------[ cut here ]------------
WARNING: CPU: 0 PID: 8227 at fs/overlayfs/copy_up.c:371 ovl_encode_real_fh+0x2d6/0x400
Modules linked in:
CPU: 0 PID: 8227 Comm: syz.6.596 Not tainted 5.15.173-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:ovl_encode_real_fh+0x2d6/0x400 fs/overlayfs/copy_up.c:371
Code: 00 4c 89 f8 48 8d 65 d8 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 8c 6b a0 fe 0f 0b eb 10 e8 83 6b a0 fe 0f 0b eb 07 e8 7a 6b a0 fe <0f> 0b 4c 89 ff e8 90 a4 e9 fe 49 c7 c7 fb ff ff ff eb 95 89 d1 80
RSP: 0018:ffffc90002faf560 EFLAGS: 00010293
RAX: ffffffff82e00826 RBX: 1ffff920005f5eb4 RCX: ffff88802a355940
RDX: 0000000000000000 RSI: 00000000000000ff RDI: 00000000000000ff
RBP: ffffc90002faf610 R08: ffffffff82e006c8 R09: fffffbfff1c14b16
R10: 0000000000000000 R11: dffffc0000000001 R12: 00000000000000ff
R13: 0000000000000080 R14: 1ffff920005f5eb0 R15: ffff888025154500
FS: 00007fbec4ebc6c0(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 0000000065ae9000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
ovl_get_index_name fs/overlayfs/namei.c:654 [inline]
ovl_lookup_index+0x6a/0x660 fs/overlayfs/namei.c:703
ovl_lookup+0x1636/0x1f10 fs/overlayfs/namei.c:1052
__lookup_slow+0x275/0x3d0 fs/namei.c:1663
lookup_slow+0x53/0x70 fs/namei.c:1680
walk_component+0x48c/0x610 fs/namei.c:1976
lookup_last fs/namei.c:2431 [inline]
path_lookupat+0x16f/0x450 fs/namei.c:2455
filename_lookup+0x230/0x5c0 fs/namei.c:2484
user_path_at_empty+0x40/0x180 fs/namei.c:2883
user_path_at include/linux/namei.h:57 [inline]
path_setxattr+0xae/0x2a0 fs/xattr.c:625
__do_sys_lsetxattr fs/xattr.c:653 [inline]
__se_sys_lsetxattr fs/xattr.c:649 [inline]
__x64_sys_lsetxattr+0xb4/0xd0 fs/xattr.c:649
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fbec7088849
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fbec4ebc058 EFLAGS: 00000246 ORIG_RAX: 00000000000000bd
RAX: ffffffffffffffda RBX: 00007fbec724e160 RCX: 00007fbec7088849
RDX: 0000000020000000 RSI: 0000000020000040 RDI: 0000000020000140
RBP: 00007fbec4ebc0a0 R08: 0000000000000000 R09: 0000000000000000
R10: 000000000000001c R11: 0000000000000246 R12: 0000000000000002
R13: 0000000000000000 R14: 00007fbec724e160 R15: 00007fffb8112a18
</TASK>


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Nov 30, 2024, 5:36:29 PM11/30/24
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 0a51d2d4527b Linux 5.15.173
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=142680df980000
kernel config: https://syzkaller.appspot.com/x/.config?x=48dad5136d11d5fc
dashboard link: https://syzkaller.appspot.com/bug?extid=fc4fdd387034eb85497f
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=122680df980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10fe5f78580000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000140
RBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000003731
R10: 000000000000001c R11: 0000000000000246 R12: 00007ffc252da8e0
R13: 00007ffc252da9c0 R14: 431bde82d7b634db R15: 00007f86ddf4212c
</TASK>
------------[ cut here ]------------
WARNING: CPU: 0 PID: 4165 at fs/overlayfs/copy_up.c:371 ovl_encode_real_fh+0x2d6/0x400
Modules linked in:
CPU: 0 PID: 4165 Comm: syz-executor215 Not tainted 5.15.173-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:ovl_encode_real_fh+0x2d6/0x400 fs/overlayfs/copy_up.c:371
Code: 00 4c 89 f8 48 8d 65 d8 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 8c 6b a0 fe 0f 0b eb 10 e8 83 6b a0 fe 0f 0b eb 07 e8 7a 6b a0 fe <0f> 0b 4c 89 ff e8 90 a4 e9 fe 49 c7 c7 fb ff ff ff eb 95 89 d1 80
RSP: 0018:ffffc90002eaf560 EFLAGS: 00010293
RAX: ffffffff82e00826 RBX: 1ffff920005d5eb4 RCX: ffff88807750d940
RDX: 0000000000000000 RSI: 00000000000000ff RDI: 00000000000000ff
RBP: ffffc90002eaf610 R08: ffffffff82e006c8 R09: fffffbfff1c14b16
R10: 0000000000000000 R11: dffffc0000000001 R12: 00000000000000ff
R13: 0000000000000080 R14: 1ffff920005d5eb0 R15: ffff88802bff8500
FS: 00005555722a2480(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055ae08ecb1e0 CR3: 000000007de18000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
ovl_get_index_name fs/overlayfs/namei.c:654 [inline]
ovl_lookup_index+0x6a/0x660 fs/overlayfs/namei.c:703
ovl_lookup+0x1636/0x1f10 fs/overlayfs/namei.c:1052
__lookup_slow+0x275/0x3d0 fs/namei.c:1663
lookup_slow+0x53/0x70 fs/namei.c:1680
walk_component+0x48c/0x610 fs/namei.c:1976
lookup_last fs/namei.c:2431 [inline]
path_lookupat+0x16f/0x450 fs/namei.c:2455
filename_lookup+0x230/0x5c0 fs/namei.c:2484
user_path_at_empty+0x40/0x180 fs/namei.c:2883
user_path_at include/linux/namei.h:57 [inline]
path_setxattr+0xae/0x2a0 fs/xattr.c:625
__do_sys_lsetxattr fs/xattr.c:653 [inline]
__se_sys_lsetxattr fs/xattr.c:649 [inline]
__x64_sys_lsetxattr+0xb4/0xd0 fs/xattr.c:649
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f86ddf00c39
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 d1 1a 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc252da868 EFLAGS: 00000246 ORIG_RAX: 00000000000000bd
RAX: ffffffffffffffda RBX: 00007ffc252da870 RCX: 00007f86ddf00c39
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000140
RBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000003731
R10: 000000000000001c R11: 0000000000000246 R12: 00007ffc252da8e0
R13: 00007ffc252da9c0 R14: 431bde82d7b634db R15: 00007f86ddf4212c
</TASK>


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

syzbot

unread,
Jan 16, 2025, 6:04:03 AM1/16/25
to syzkaller...@googlegroups.com
syzbot suspects this issue could be fixed by backporting the following commit:

commit c3a5e3e872f3688ae0dc57bb78ca633921d96a91
git tree: upstream
Author: David Howells <dhow...@redhat.com>
Date: Tue Jul 23 08:59:54 2024 +0000

vfs: Fix potential circular locking through setxattr() and removexattr()

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=110e02b0580000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13f88c90580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=128c05e8580000


Please keep in mind that other backports might be required as well.

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages