kernel BUG in iput

5 views
Skip to first unread message

syzbot

unread,
Mar 20, 2022, 5:01:18 AM3/20/22
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 5287773dba0d Merge 5.10.106 into android12-5.10-lts
git tree: android12-5.10-lts
console output: https://syzkaller.appspot.com/x/log.txt?x=17dc92eb700000
kernel config: https://syzkaller.appspot.com/x/.config?x=58f0ccb364b6905c
dashboard link: https://syzkaller.appspot.com/bug?extid=2cfd2a4fc18e40303fb2
compiler: Debian clang version 11.0.1-2, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1412c535700000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=103c92eb700000

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

RSP: 002b:00007fffb6f086d8 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fffb6f08730 RCX: 00007fc1f62f16aa
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007fffb6f086f0
RBP: 00007fffb6f086f0 R08: 00007fffb6f08730 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000286 R12: 0000000020000338
R13: 0000000000000004 R14: 0000000000000005 R15: 000000000000000d
exFAT-fs (loop0): failed to get the root dentry
------------[ cut here ]------------
kernel BUG at fs/inode.c:1672!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 675 Comm: syz-executor332 Not tainted 5.10.106-syzkaller-00514-g5287773dba0d #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:iput+0x7d1/0x7e0 fs/inode.c:1672
Code: f1 ff e9 f0 fb ff ff 44 89 f9 80 e1 07 80 c1 03 38 c1 0f 8c cb fe ff ff 4c 89 ff e8 d9 33 f1 ff e9 be fe ff ff e8 5f 32 b7 ff <0f> 0b 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 55 48 89 e5 41 57 41
RSP: 0018:ffffc90000ff79f0 EFLAGS: 00010293
RAX: ffffffff81b5bc21 RBX: 0000000000000040 RCX: ffff88810b3b13c0
RDX: 0000000000000000 RSI: 0000000000000040 RDI: 0000000000000000
RBP: ffffc90000ff7a50 R08: ffffffff81b5b4b1 R09: ffffed103ee2a5d8
R10: ffffed103ee2a5d8 R11: 0000000000000000 R12: ffff88811dd9fa90
R13: dffffc0000000000 R14: ffff88811dd9fa90 R15: 00000000fffffff4
FS: 00005555568f3300(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc1f62c4e80 CR3: 000000010ca45000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
exfat_fill_super+0x1fe1/0x2a20 fs/exfat/super.c:699
get_tree_bdev+0x41d/0x640 fs/super.c:1344
exfat_get_tree+0x1c/0x20 fs/exfat/super.c:717
vfs_get_tree+0x89/0x270 fs/super.c:1549
do_new_mount fs/namespace.c:2899 [inline]
path_mount+0x1975/0x2ab0 fs/namespace.c:3229
do_mount fs/namespace.c:3242 [inline]
__do_sys_mount fs/namespace.c:3450 [inline]
__se_sys_mount+0x2f7/0x3b0 fs/namespace.c:3427
__x64_sys_mount+0xbf/0xd0 fs/namespace.c:3427
do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7fc1f62f16aa
Code: 48 c7 c2 c0 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 a8 00 00 00 0f 1f 84 00 00 00 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fffb6f086d8 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fffb6f08730 RCX: 00007fc1f62f16aa
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007fffb6f086f0
RBP: 00007fffb6f086f0 R08: 00007fffb6f08730 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000286 R12: 0000000020000338
R13: 0000000000000004 R14: 0000000000000005 R15: 000000000000000d
Modules linked in:
---[ end trace b5370d0babd45bb4 ]---
RIP: 0010:iput+0x7d1/0x7e0 fs/inode.c:1672
Code: f1 ff e9 f0 fb ff ff 44 89 f9 80 e1 07 80 c1 03 38 c1 0f 8c cb fe ff ff 4c 89 ff e8 d9 33 f1 ff e9 be fe ff ff e8 5f 32 b7 ff <0f> 0b 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 55 48 89 e5 41 57 41
RSP: 0018:ffffc90000ff79f0 EFLAGS: 00010293
RAX: ffffffff81b5bc21 RBX: 0000000000000040 RCX: ffff88810b3b13c0
RDX: 0000000000000000 RSI: 0000000000000040 RDI: 0000000000000000
RBP: ffffc90000ff7a50 R08: ffffffff81b5b4b1 R09: ffffed103ee2a5d8
R10: ffffed103ee2a5d8 R11: 0000000000000000 R12: ffff88811dd9fa90
R13: dffffc0000000000 R14: ffff88811dd9fa90 R15: 00000000fffffff4
FS: 00005555568f3300(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc1f63200c0 CR3: 000000010ca45000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
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.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

Tadeusz Struk

unread,
Mar 21, 2022, 12:17:15 PM3/21/22
to syzbot+2cfd2a...@syzkaller.appspotmail.com, syzkaller
#syz test: https://android.googlesource.com/kernel/common android12-5.10

====================================================
index d38d17a77e76..5539ffc20d16 100644
--- a/fs/exfat/super.c
+++ b/fs/exfat/super.c
@@ -690,7 +690,7 @@ static int exfat_fill_super(struct super_block *sb, struct
fs_context *fc)
if (!sb->s_root) {
exfat_err(sb, "failed to get the root dentry");
err = -ENOMEM;
- goto put_inode;
+ goto free_table;
}

return 0;

syzbot

unread,
Mar 21, 2022, 12:30:09 PM3/21/22
to syzkaller-a...@googlegroups.com, tadeus...@linaro.org
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-and-tested-by: syzbot+2cfd2a...@syzkaller.appspotmail.com

Tested on:

commit: 1419b694 Merge tag 'android12-5.10.101_r00' into andro..
git tree: https://android.googlesource.com/kernel/common android12-5.10
kernel config: https://syzkaller.appspot.com/x/.config?x=1ff3b8aff389a956
dashboard link: https://syzkaller.appspot.com/bug?extid=2cfd2a4fc18e40303fb2
compiler: Debian clang version 11.0.1-2, GNU ld (GNU Binutils for Debian) 2.35.2
patch: https://syzkaller.appspot.com/x/patch.diff?x=153292eb700000

Note: testing is done by a robot and is best-effort only.

Tadeusz Struk

unread,
Mar 21, 2022, 1:08:45 PM3/21/22
to syzbot, syzkaller-a...@googlegroups.com
#syz fix: exfat: avoid incorrectly releasing for root inode
Reply all
Reply to author
Forward
0 new messages