[moderation] [fs?] general protection fault in lookup_one_qstr_excl

0 views
Skip to first unread message

syzbot

unread,
10:44 PM (1 hour ago) 10:44 PM
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 84abb955b101 Add linux-next specific files for 20261113
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=12e4d5a1580000
kernel config: https://syzkaller.appspot.com/x/.config?x=d9d5eeb0ba036071
dashboard link: https://syzkaller.appspot.com/bug?extid=57470a9c0555e9e9ae37
compiler: Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8
CC: [bra...@kernel.org ja...@suse.cz linux-...@vger.kernel.org linux-...@vger.kernel.org vi...@zeniv.linux.org.uk]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/ffae1d4a717e/disk-84abb955.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/fd2a35a63abf/vmlinux-84abb955.xz
kernel image: https://storage.googleapis.com/syzbot-assets/039ccf647778/bzImage-84abb955.xz

AI-generated root cause summary:
In squashfs_lookup() (fs/squashfs/namei.c), squashfs_read_metadata() returns the
positive number of bytes read on success, which is stored in err. When a
subsequent squashfs_dir_space() check fails, execution branches directly to
read_failure without setting err to a negative errno like -EIO, causing
squashfs_lookup() to return ERR_PTR(err) where err is a positive integer (e.g.,
6). The VFS caller lookup_one_qstr_excl() treats this positive pointer as a
valid struct dentry pointer because IS_ERR() evaluates to false, and immediately
dereferences dentry->d_flags (offset 0), causing a near-NULL pointer dereference
crash.

full analysis: https://syzkaller.appspot.com/x/ai_root_cause?x=57470a9c0555e9e9ae37

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

SQUASHFS error: Unable to read directory block [0:26]
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 0 UID: 0 PID: 27175 Comm: syz.0.4852 Tainted: G L syzkaller #0 PREEMPT(full)
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
RIP: 0010:__d_entry_type include/linux/dcache.h:452 [inline]
RIP: 0010:d_is_miss include/linux/dcache.h:457 [inline]
RIP: 0010:d_is_negative include/linux/dcache.h:503 [inline]
RIP: 0010:lookup_one_qstr_excl+0x155/0x360 fs/namei.c:1847
Code: ff d3 48 85 c0 0f 85 8f 01 00 00 e8 a5 a6 66 ff 49 81 fe 01 f0 ff ff 72 0a e8 97 a6 66 ff e9 86 00 00 00 4c 89 f0 48 c1 e8 03 <0f> b6 04 28 84 c0 0f 85 b6 01 00 00 bd 00 00 38 00 41 23 2e 41 89
RSP: 0018:ffffc9000329fcb0 EFLAGS: 00010247
RAX: 0000000000000000 RBX: 0000000000060000 RCX: 0000000000080000
RDX: ffffc9001e675000 RSI: 00000000000004ba RDI: 00000000000004bb
RBP: dffffc0000000000 R08: ffff88804c7c2a7b R09: 1ffff110098f854f
R10: dffffc0000000000 R11: ffffed10098f8550 R12: ffff88804c7c29c0
R13: ffff88804c490040 R14: 0000000000000006 R15: 0000000000000006
FS: 00007fa6221956c0(0000) GS:ffff8881233cd000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200000003000 CR3: 0000000056c48000 CR4: 00000000003526f0
DR0: ffffffffffffffff DR1: 00000000000001f8 DR2: 0000000000000083
DR3: ffffffffefffff15 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
__start_dirop fs/namei.c:2971 [inline]
start_dirop fs/namei.c:2993 [inline]
filename_create+0x20e/0x370 fs/namei.c:5214
filename_symlinkat+0xe8/0x430 fs/namei.c:5913
__do_sys_symlink fs/namei.c:5946 [inline]
__se_sys_symlink+0x4d/0x2b0 fs/namei.c:5942
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x00007fa623fa94d9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fa622195028 EFLAGS: 00000246 ORIG_RAX: 0000000000000058
RAX: ffffffffffffffda RBX: 00007fa624226180 RCX: 00007fa623fa94d9
RDX: 0000000000000000 RSI: 0000200000020240 RDI: 0000000000000000
RBP: 00007fa62403804e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fa624226218 R14: 00007fa624226180 R15: 00007fff8ae4f768
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__d_entry_type include/linux/dcache.h:452 [inline]
RIP: 0010:d_is_miss include/linux/dcache.h:457 [inline]
RIP: 0010:d_is_negative include/linux/dcache.h:503 [inline]
RIP: 0010:lookup_one_qstr_excl+0x155/0x360 fs/namei.c:1847
Code: ff d3 48 85 c0 0f 85 8f 01 00 00 e8 a5 a6 66 ff 49 81 fe 01 f0 ff ff 72 0a e8 97 a6 66 ff e9 86 00 00 00 4c 89 f0 48 c1 e8 03 <0f> b6 04 28 84 c0 0f 85 b6 01 00 00 bd 00 00 38 00 41 23 2e 41 89
RSP: 0018:ffffc9000329fcb0 EFLAGS: 00010247
RAX: 0000000000000000 RBX: 0000000000060000 RCX: 0000000000080000
RDX: ffffc9001e675000 RSI: 00000000000004ba RDI: 00000000000004bb
RBP: dffffc0000000000 R08: ffff88804c7c2a7b R09: 1ffff110098f854f
R10: dffffc0000000000 R11: ffffed10098f8550 R12: ffff88804c7c29c0
R13: ffff88804c490040 R14: 0000000000000006 R15: 0000000000000006
FS: 00007fa6221956c0(0000) GS:ffff8881233cd000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f408035da08 CR3: 0000000056c48000 CR4: 00000000003526f0
DR0: ffffffffffffffff DR1: 00000000000001f8 DR2: 0000000000000083
DR3: ffffffffefffff15 DR6: 00000000ffff0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: ff d3 call *%rbx
2: 48 85 c0 test %rax,%rax
5: 0f 85 8f 01 00 00 jne 0x19a
b: e8 a5 a6 66 ff call 0xff66a6b5
10: 49 81 fe 01 f0 ff ff cmp $0xfffffffffffff001,%r14
17: 72 0a jb 0x23
19: e8 97 a6 66 ff call 0xff66a6b5
1e: e9 86 00 00 00 jmp 0xa9
23: 4c 89 f0 mov %r14,%rax
26: 48 c1 e8 03 shr $0x3,%rax
* 2a: 0f b6 04 28 movzbl (%rax,%rbp,1),%eax <-- trapping instruction
2e: 84 c0 test %al,%al
30: 0f 85 b6 01 00 00 jne 0x1ec
36: bd 00 00 38 00 mov $0x380000,%ebp
3b: 41 23 2e and (%r14),%ebp
3e: 41 rex.B
3f: 89 .byte 0x89


---
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
Reply all
Reply to author
Forward
0 new messages