All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+5d7ba5f6127ed887f459@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, phillip@squashfs.org.uk,
	 squashfs-devel@lists.sourceforge.net,
	syzkaller-bugs@googlegroups.com
Subject: [syzbot] [squashfs?] general protection fault in __d_obtain_alias
Date: Sat, 14 Nov 2026 04:29:25 -0800	[thread overview]
Message-ID: <6af85425.097d52ff.3d440.0006.GAE@google.com> (raw)

Hello,

syzbot found the following issue on:

HEAD commit:    84abb955b101 Add linux-next specific files for 20261113
git tree:       linux-next
console+strace: https://syzkaller.appspot.com/x/log.txt?x=122fbda1580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=d9d5eeb0ba036071
dashboard link: https://syzkaller.appspot.com/bug?extid=5d7ba5f6127ed887f459
compiler:       Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=174cb369580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1136b011580000

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
mounted in repro: https://storage.googleapis.com/syzbot-assets/3d55211a7134/mount_0.gz

AI-generated root cause summary:
In fs/squashfs/inode.c:squashfs_read_inode(), squashfs_read_metadata() returns
the number of bytes read on success (e.g. sizeof(struct squashfs_dir_inode) ==
32) into err. When checking directory inodes (SQUASHFS_DIR_TYPE and
SQUASHFS_LDIR_TYPE) where inode->i_size < 3, the code jumps to failed_read via
goto without updating err to a negative error code (such as -EINVAL). As a
result, squashfs_read_inode() returns a positive integer (32 or 40), which
squashfs_iget() wraps with ERR_PTR(err) into (struct inode *)0x20. Callers like
d_obtain_alias() check IS_ERR(inode), which evaluates to false for positive
values, and subsequently dereference inode->i_sb at offset 0x28 (address 0x48),
triggering a near-NULL pointer dereference crash.

full analysis:  https://syzkaller.appspot.com/x/ai_root_cause?x=5d7ba5f6127ed887f459

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

loop0: detected capacity change from 0 to 8
SQUASHFS error: Unable to read inode 0x87
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000009: 0000 [#1] SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000048-0x000000000000004f]
CPU: 0 UID: 0 PID: 5647 Comm: syz-executor372 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
RIP: 0010:__d_obtain_alias+0x50/0x880 fs/dcache.c:2359
Code: e8 25 e6 64 ff eb 53 e8 1e e6 64 ff 49 c7 c5 8c ff ff ff eb 45 49 bf 00 00 00 00 00 fc ff df 49 8d 7d 28 48 89 f8 48 c1 e8 03 <42> 80 3c 38 00 74 05 e8 14 da e4 ff 4d 8b 75 28 4c 89 ef e8 a8 a8
RSP: 0018:ffffc90003b2f9d0 EFLAGS: 00010206
RAX: 0000000000000009 RBX: 0000000000000002 RCX: ffff888079600000
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000048
RBP: 0000000000000001 R08: ffffffff91bec8bf R09: 1ffffffff237d917
R10: dffffc0000000000 R11: fffffbfff237d918 R12: ffff88807deca000
R13: 0000000000000020 R14: 1ffff92000765f4c R15: dffffc0000000000
FS:  000055556efe9400(0000) GS:ffff8881233cd000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffc93144b5c CR3: 000000007b0fe000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 squashfs_export_iget+0x1d8/0x370 fs/squashfs/export.c:117
 exportfs_decode_fh_raw+0x1c8/0x770 fs/exportfs/expfs.c:460
 do_handle_to_path+0xa4/0x1a0 fs/fhandle.c:274
 handle_to_path fs/fhandle.c:423 [inline]
 do_handle_open+0x6dd/0xb10 fs/fhandle.c:447
 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:0x00007fab5525dc49
Code: c0 79 93 eb d5 48 8d 7c 1d 00 eb 99 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 d8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff9e969ae8 EFLAGS: 00000246 ORIG_RAX: 0000000000000130
RAX: ffffffffffffffda RBX: 00007fab552bd0b0 RCX: 00007fab5525dc49
RDX: 0000000000000000 RSI: 0000200000000340 RDI: 0000000000000004
RBP: 0000000000000001 R08: 000055556efea580 R09: 000055556efea580
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fff9e969b10
R13: 0000000000000002 R14: 431bde82d7b634db R15: 00007fab552bd04b
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__d_obtain_alias+0x50/0x880 fs/dcache.c:2359
Code: e8 25 e6 64 ff eb 53 e8 1e e6 64 ff 49 c7 c5 8c ff ff ff eb 45 49 bf 00 00 00 00 00 fc ff df 49 8d 7d 28 48 89 f8 48 c1 e8 03 <42> 80 3c 38 00 74 05 e8 14 da e4 ff 4d 8b 75 28 4c 89 ef e8 a8 a8
RSP: 0018:ffffc90003b2f9d0 EFLAGS: 00010206
RAX: 0000000000000009 RBX: 0000000000000002 RCX: ffff888079600000
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000048
RBP: 0000000000000001 R08: ffffffff91bec8bf R09: 1ffffffff237d917
R10: dffffc0000000000 R11: fffffbfff237d918 R12: ffff88807deca000
R13: 0000000000000020 R14: 1ffff92000765f4c R15: dffffc0000000000
FS:  000055556efe9400(0000) GS:ffff8881233cd000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffc93144b5c CR3: 000000007b0fe000 CR4: 00000000003526f0
----------------
Code disassembly (best guess):
   0:	e8 25 e6 64 ff       	call   0xff64e62a
   5:	eb 53                	jmp    0x5a
   7:	e8 1e e6 64 ff       	call   0xff64e62a
   c:	49 c7 c5 8c ff ff ff 	mov    $0xffffffffffffff8c,%r13
  13:	eb 45                	jmp    0x5a
  15:	49 bf 00 00 00 00 00 	movabs $0xdffffc0000000000,%r15
  1c:	fc ff df
  1f:	49 8d 7d 28          	lea    0x28(%r13),%rdi
  23:	48 89 f8             	mov    %rdi,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 80 3c 38 00       	cmpb   $0x0,(%rax,%r15,1) <-- trapping instruction
  2f:	74 05                	je     0x36
  31:	e8 14 da e4 ff       	call   0xffe4da4a
  36:	4d 8b 75 28          	mov    0x28(%r13),%r14
  3a:	4c 89 ef             	mov    %r13,%rdi
  3d:	e8                   	.byte 0xe8
  3e:	a8 a8                	test   $0xa8,%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 syzkaller@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	other threads:[~2026-11-14 12:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6af85425.097d52ff.3d440.0006.GAE@google.com \
    --to=syzbot+5d7ba5f6127ed887f459@syzkaller.appspotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phillip@squashfs.org.uk \
    --cc=squashfs-devel@lists.sourceforge.net \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.