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=1228644d580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=d9d5eeb0ba036071
dashboard link:
https://syzkaller.appspot.com/bug?extid=86a706ca349489783afb
compiler: Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8
CC: [
jmo...@namei.org linux-...@vger.kernel.org linux-secu...@vger.kernel.org pa...@paul-moore.com se...@hallyn.com]
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_read_inode(), validation checks for directory types
SQUASHFS_DIR_TYPE and SQUASHFS_LDIR_TYPE jump to failed_read when inode->i_size
< 3 without initializing err to a negative errno (-EINVAL). Consequently, err
retains the positive byte count returned by the preceding
squashfs_read_metadata() call (sizeof(struct squashfs_dir_inode) == 32 == 0x20,
or 40 == 0x28 for LDIR). When squashfs_iget() receives this positive return
value, it invokes ERR_PTR(err), yielding an invalid non-negative pointer (e.g.
(void *)0x20) that bypasses IS_ERR() and NULL checks in d_splice_alias_ops().
Passing this bogus inode pointer to security_d_instantiate() causes a
NULL-pointer dereference when reading inode->i_flags at offset 0x24.
full analysis:
https://syzkaller.appspot.com/x/ai_root_cause?x=86a706ca349489783afb
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+86a706...@syzkaller.appspotmail.com
loop8: detected capacity change from 0 to 8
SQUASHFS error: Unable to read inode 0x87
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000004: 0000 [#1] SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000020-0x0000000000000027]
CPU: 1 UID: 0 PID: 26505 Comm: syz.8.8351 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:security_d_instantiate+0x2f/0x1d0 security/security.c:3781
Code: 41 57 41 56 53 48 89 f3 49 89 fe e8 bb 2c 20 fd 48 85 db 74 42 4c 8d 7b 04 4c 89 f8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <0f> b6 04 08 84 c0 0f 85 9d 00 00 00 41 8b 2f 89 ee 81 e6 00 02 00
RSP: 0018:ffffc90003d9f758 EFLAGS: 00010203
RAX: 0000000000000004 RBX: 0000000000000020 RCX: dffffc0000000000
RDX: ffffc9000dd75000 RSI: 000000000000051e RDI: 000000000000051f
RBP: ffffc90003d9f9b0 R08: ffffffff91bec8bf R09: 1ffffffff237d917
R10: dffffc0000000000 R11: fffffbfff237d918 R12: 0000000000000000
R13: dffffc0000000000 R14: ffff888051cb0b60 R15: 0000000000000024
FS: 00007f725c2136c0(0000) GS:ffff8881234cd000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2e71aff8 CR3: 000000007ab04000 CR4: 00000000003526f0
Call Trace:
<TASK>
d_splice_alias_ops+0x72/0x440 fs/dcache.c:3458
squashfs_lookup+0xc5e/0x14e0 fs/squashfs/namei.c:273
finish_lookup fs/namei.c:1934 [inline]
lookup_open+0x816/0x16e0 fs/namei.c:4644
open_last_lookups fs/namei.c:4880 [inline]
path_openat+0x7a5/0x20e0 fs/namei.c:5119
do_file_open+0x23e/0x4a0 fs/namei.c:5151
do_sys_openat2+0x115/0x200 fs/open.c:1492
do_sys_open fs/open.c:1498 [inline]
__do_sys_open fs/open.c:1830 [inline]
__se_sys_open fs/open.c:1826 [inline]
__x64_sys_open+0x11e/0x150 fs/open.c:1826
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:0x00007f725b3a94d9
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:00007f725c213028 EFLAGS: 00000246 ORIG_RAX: 0000000000000002
RAX: ffffffffffffffda RBX: 00007f725b625fa0 RCX: 00007f725b3a94d9
RDX: 0000000000000112 RSI: 0000000000000000 RDI: 0000200000000840
RBP: 00007f725b43804e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f725b626038 R14: 00007f725b625fa0 R15: 00007fffadf9a0c8
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:security_d_instantiate+0x2f/0x1d0 security/security.c:3781
Code: 41 57 41 56 53 48 89 f3 49 89 fe e8 bb 2c 20 fd 48 85 db 74 42 4c 8d 7b 04 4c 89 f8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <0f> b6 04 08 84 c0 0f 85 9d 00 00 00 41 8b 2f 89 ee 81 e6 00 02 00
RSP: 0018:ffffc90003d9f758 EFLAGS: 00010203
RAX: 0000000000000004 RBX: 0000000000000020 RCX: dffffc0000000000
RDX: ffffc9000dd75000 RSI: 000000000000051e RDI: 000000000000051f
RBP: ffffc90003d9f9b0 R08: ffffffff91bec8bf R09: 1ffffffff237d917
R10: dffffc0000000000 R11: fffffbfff237d918 R12: 0000000000000000
R13: dffffc0000000000 R14: ffff888051cb0b60 R15: 0000000000000024
FS: 00007f725c2136c0(0000) GS:ffff8881233cd000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f3b04664000 CR3: 000000007ab04000 CR4: 00000000003526f0
----------------
Code disassembly (best guess):
0: 41 57 push %r15
2: 41 56 push %r14
4: 53 push %rbx
5: 48 89 f3 mov %rsi,%rbx
8: 49 89 fe mov %rdi,%r14
b: e8 bb 2c 20 fd call 0xfd202ccb
10: 48 85 db test %rbx,%rbx
13: 74 42 je 0x57
15: 4c 8d 7b 04 lea 0x4(%rbx),%r15
19: 4c 89 f8 mov %r15,%rax
1c: 48 c1 e8 03 shr $0x3,%rax
20: 48 b9 00 00 00 00 00 movabs $0xdffffc0000000000,%rcx
27: fc ff df
* 2a: 0f b6 04 08 movzbl (%rax,%rcx,1),%eax <-- trapping instruction
2e: 84 c0 test %al,%al
30: 0f 85 9d 00 00 00 jne 0xd3
36: 41 8b 2f mov (%r15),%ebp
39: 89 ee mov %ebp,%esi
3b: 81 .byte 0x81
3c: e6 00 out %al,$0x0
3e: 02 00 add (%rax),%al
---
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