BUG: unable to handle kernel paging request in squashfs_lookup

Status: moderation: reported on 2026/11/23 21:20
Subsystems: squashfs
Labels: prio:low
[Documentation on labels]
Reported-by: syzbot+baf3612d9a25ed5ba06d@syzkaller.appspotmail.com
First crash: 1h03m, last: 41m
✨ AI cause bisection: introduced by (AI job) :
commit 5b515c0ec855811ab62985033c44dde99c15f326
Author: Phillip Lougher <phillip@squashfs.org.uk>
Date: Mon Nov 23 03:42:49 2026 +0000

  Squashfs: don't compute start or alloc memory on empty directory or index

✨ AI-generated root cause summary:

In squashfs_lookup() (fs/squashfs/namei.c), the local pointer struct inode *inode is initialized to NULL and immediately passed to squashfs_i(inode)->start and squashfs_i(inode)->offset in a TRACE() (pr_debug()) call instead of the directory parameter dir. Because squashfs_i() uses container_of(..., struct squashfs_inode_info, vfs_inode) where vfs_inode is at offset 0x40 (64 bytes), squashfs_i(NULL) evaluates to 0xffffffffffffffc0. When dynamic debug (CONFIG_DYNAMIC_DEBUG) is enabled for this call site (or DEBUG is defined), any SquashFS directory lookup dereferences 0xffffffffffffffc0 and triggers a fatal kernel read page fault.

▶ ▼ ✨ Full AI root cause analysis
Based on kernel commit 3191063649db:

Root Cause Analysis

The crash is caused by a NULL pointer dereference via container_of() in squashfs_lookup() (fs/squashfs/namei.c:180-181).

Mechanism

In squashfs_lookup() (fs/squashfs/namei.c:166-181):

static struct dentry *squashfs_lookup(struct inode *dir, struct dentry *dentry,
				      unsigned int flags)
{
	...
	struct inode *inode = NULL;
	...
	TRACE("Entered squashfs_lookup [%llx:%x]\n", squashfs_i(inode)->start,
			squashfs_i(inode)->offset);
  1. Wrong variable passed to TRACE(): The local variable inode is initialized to NULL (it is only populated later on line 271 via squashfs_iget() when a matching directory entry is found). The TRACE() macro at lines 180–181 erroneously passes inode to squashfs_i() instead of the directory inode parameter dir (unlike lines 190, 200, and 285, which correctly use squashfs_i(dir)).
  2. container_of(NULL, ...) arithmetic: squashfs_i() (fs/squashfs/squashfs_fs_i.h:37-40) computes container_of(inode, struct squashfs_inode_info, vfs_inode). In struct squashfs_inode_info (fs/squashfs/squashfs_fs_i.h:13-34), vfs_inode is at byte offset 64 (0x40), and start is at byte offset 0. Passing inode == NULL yields (struct squashfs_inode_info *)((char *)0 - 0x40) = 0xffffffffffffffc0.
  3. Trigger condition: TRACE() expands to pr_debug(...) (fs/squashfs/squashfs.h:11). With CONFIG_DYNAMIC_DEBUG=y enabled and the dynamic debug call site activated (or if compiled with DEBUG), entering squashfs_lookup() during path lookup (e.g., openat() -> lookup_open() -> squashfs_lookup()) evaluates squashfs_i(inode)->start, reading from the unmapped address 0xffffffffffffffc0 (mov 0xffffffffffffffc0,%r14) and causing a supervisor read page fault.

Fix

Pass dir instead of inode to squashfs_i() in TRACE() at fs/squashfs/namei.c:180-181:

	TRACE("Entered squashfs_lookup [%llx:%x]\n", squashfs_i(dir)->start,
			squashfs_i(dir)->offset);
▶ ▼ ✨ AI Jobs (2)
ID Workflow Result Correct Bug Created Started Finished Revision
ce9f921f bisect-cause IsRelease: ❌ ❓ BUG: unable to handle kernel paging request in squashfs_lookup 2026/11/23 20:44 2026/11/23 20:44 2026/11/23 21:13 fab64d89
905588e3 assessment-security DenialOfService: ✅ Exploitable: ❌ FilesystemTrigger: ❌ FuzzingArtifact: ❌ MemoryCorruption: ❌ NetworkNeedsSetup: ❌ NetworkTrigger: ❌ PeripheralTrigger: ❌ RemoteTrigger: ❌ Unprivileged: ❌ UserNamespace: ❌ VMGuestTrigger: ❌ VMHostTrigger: ❌ ❓ BUG: unable to handle kernel paging request in squashfs_lookup 2026/11/23 20:44 2026/11/23 20:44 2026/11/23 21:19 fab64d89

Sample crash report:
kcov: kcov_start: t = ffff88801faabe80, size = 524288, area = ffffc900101d2000
BUG: unable to handle page fault for address: ffffffffffffffc0
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 1014b067 P4D 1014b067 PUD 1014d067 PMD 0 
Oops: Oops: 0000 [#1] SMP KASAN PTI
CPU: 0 UID: 0 PID: 21084 Comm: syz.3.2809 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:squashfs_lookup+0x1342/0x14a0 fs/squashfs/namei.c:180
Code: e8 33 72 89 ff e9 7a f8 ff ff 4d 89 f4 48 b8 f8 ff ff ff ff ff ff 1f 41 80 3c 07 00 74 0c 48 c7 c7 c0 ff ff ff e8 ae 71 89 ff <4c> 8b 34 25 c0 ff ff ff 48 b8 f9 ff ff ff ff ff ff 1f 48 b9 00 00
RSP: 0018:ffffc90003c0fac0 EFLAGS: 00010246
RAX: 1ffffffffffffff8 RBX: ffff88802781c800 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffc90003c0fbfc
RBP: ffffc90003c0fca0 R08: 0000000000000003 R09: 0000000000000000
R10: ffffc90003c0fbf0 R11: fffff52000781f7f R12: ffff88807db681a0
R13: 1ffff92000781f74 R14: ffff88807db681a0 R15: dffffc0000000000
FS:  00007fc7378b56c0(0000) GS:ffff8881231b3000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffc0 CR3: 0000000058f58000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000008000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 lookup_one_qstr_excl+0x12d/0x360 fs/namei.c:1840
 __start_dirop fs/namei.c:2972 [inline]
 start_dirop fs/namei.c:2994 [inline]
 filename_create+0x20e/0x370 fs/namei.c:5218
 filename_mkdirat+0xd2/0x550 fs/namei.c:5544
 __do_sys_mkdirat fs/namei.c:5572 [inline]
 __se_sys_mkdirat+0x35/0x150 fs/namei.c:5569
 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:0x00007fc7369a8387
Code: 00 66 90 48 89 f2 b9 00 01 00 00 48 89 fe bf 9c ff ff ff e9 db f7 ff ff 66 2e 0f 1f 84 00 00 00 00 00 90 b8 02 01 00 00 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:00007fc7378b4e58 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007fc7378b4ee0 RCX: 00007fc7369a8387
RDX: 00000000000001ff RSI: 0000200000000ac0 RDI: 00000000ffffff9c
RBP: 0000200000000a80 R08: 0000000000000001 R09: 0000200000000bc0
R10: 0000200000000a80 R11: 0000000000000246 R12: 0000200000000ac0
R13: 00007fc7378b4ea0 R14: 0000000000000000 R15: 0000000000000000
 </TASK>
Modules linked in:
CR2: ffffffffffffffc0
---[ end trace 0000000000000000 ]---
RIP: 0010:squashfs_lookup+0x1342/0x14a0 fs/squashfs/namei.c:180
Code: e8 33 72 89 ff e9 7a f8 ff ff 4d 89 f4 48 b8 f8 ff ff ff ff ff ff 1f 41 80 3c 07 00 74 0c 48 c7 c7 c0 ff ff ff e8 ae 71 89 ff <4c> 8b 34 25 c0 ff ff ff 48 b8 f9 ff ff ff ff ff ff 1f 48 b9 00 00
RSP: 0018:ffffc90003c0fac0 EFLAGS: 00010246
RAX: 1ffffffffffffff8 RBX: ffff88802781c800 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffc90003c0fbfc
RBP: ffffc90003c0fca0 R08: 0000000000000003 R09: 0000000000000000
R10: ffffc90003c0fbf0 R11: fffff52000781f7f R12: ffff88807db681a0
R13: 1ffff92000781f74 R14: ffff88807db681a0 R15: dffffc0000000000
FS:  00007fc7378b56c0(0000) GS:ffff8881231b3000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffc0 CR3: 0000000058f58000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000008000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	e8 33 72 89 ff       	call   0xff897238
   5:	e9 7a f8 ff ff       	jmp    0xfffff884
   a:	4d 89 f4             	mov    %r14,%r12
   d:	48 b8 f8 ff ff ff ff 	movabs $0x1ffffffffffffff8,%rax
  14:	ff ff 1f
  17:	41 80 3c 07 00       	cmpb   $0x0,(%r15,%rax,1)
  1c:	74 0c                	je     0x2a
  1e:	48 c7 c7 c0 ff ff ff 	mov    $0xffffffffffffffc0,%rdi
  25:	e8 ae 71 89 ff       	call   0xff8971d8
* 2a:	4c 8b 34 25 c0 ff ff 	mov    0xffffffffffffffc0,%r14 <-- trapping instruction
  31:	ff
  32:	48 b8 f9 ff ff ff ff 	movabs $0x1ffffffffffffff9,%rax
  39:	ff ff 1f
  3c:	48                   	rex.W
  3d:	b9                   	.byte 0xb9

Crashes (9):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/11/23 21:06 linux-next 3191063649db e9bfbe3a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel paging request in squashfs_lookup
2026/11/23 21:05 linux-next 3191063649db e9bfbe3a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel paging request in squashfs_lookup
2026/11/23 21:04 linux-next 3191063649db e9bfbe3a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel paging request in squashfs_lookup
2026/11/23 20:55 linux-next 3191063649db e9bfbe3a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel paging request in squashfs_lookup
2026/11/23 20:54 linux-next 3191063649db e9bfbe3a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel paging request in squashfs_lookup
2026/11/23 20:51 linux-next 3191063649db e9bfbe3a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel paging request in squashfs_lookup
2026/11/23 20:51 linux-next 3191063649db e9bfbe3a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel paging request in squashfs_lookup
2026/11/23 20:44 linux-next 3191063649db e9bfbe3a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel paging request in squashfs_lookup
2026/11/23 20:43 linux-next 3191063649db e9bfbe3a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel paging request in squashfs_lookup
* Struck through repros no longer work on HEAD.