From: Andrew Morton <akpm@linux-foundation.org>
To: Shuai Liu <847807867@qq.com>
Cc: phillip@squashfs.org.uk, squashfs-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org,
syzbot+f1290205423d04eee4cb@syzkaller.appspotmail.com
Subject: Re: [PATCH] squashfs: fix NULL pointer deref in squashfs_lookup TRACE
Date: Thu, 26 Nov 2026 15:49:48 -0800 [thread overview]
Message-ID: <20261126154948.e81cd1dedea46e56dd33c258@linux-foundation.org> (raw)
In-Reply-To: <tencent_DC2C02F2FD4DBEB8416265132CEED7D2AA08@qq.com>
On Thu, 26 Nov 2026 19:19:24 +0800 Shuai Liu <847807867@qq.com> wrote:
> In squashfs_lookup(), commit 5b515c0ec855 ("Squashfs: don't compute start
> or alloc memory on empty directory or index") moved the TRACE statement
> to before the block/offset variable initialization, so the TRACE was
> rewritten to use squashfs_i(inode) instead of squashfs_i(dir). But
> inode is initialized to NULL, so squashfs_i(NULL) evaluates to an
> invalid pointer which triggers a kernel page fault when
> CONFIG_DYNAMIC_DEBUG or DEBUG enables the pr_debug() call.
>
> ...
>
> - TRACE("Entered squashfs_lookup [%llx:%x]\n", squashfs_i(inode)->start,
> - squashfs_i(inode)->offset);
> + TRACE("Entered squashfs_lookup [%llx:%x]\n", squashfs_i(dir)->start,
> + squashfs_i(dir)->offset);
>
> if (len > SQUASHFS_NAME_LEN)
> return ERR_PTR(-ENAMETOOLONG);
Yep, thanks, Phillip squashed this bug in the v4 series.
prev parent reply other threads:[~2026-11-26 23:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 11:19 Shuai Liu
2026-11-26 23:49 ` Andrew Morton [this message]
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=20261126154948.e81cd1dedea46e56dd33c258@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=847807867@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=phillip@squashfs.org.uk \
--cc=squashfs-devel@lists.sourceforge.net \
--cc=syzbot+f1290205423d04eee4cb@syzkaller.appspotmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®