* [merged mm-nonmm-stable] squashfs-verify-inode-mode-when-loading-from-disk.patch removed from -mm tree
@ 2025-09-14 0:35 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-09-14 0:35 UTC (permalink / raw)
To: mm-commits, syzbot+895c23f6917da440ed0d, phillip, penguin-kernel,
akpm
The quilt patch titled
Subject: squashfs: verify inode mode when loading from disk
has been removed from the -mm tree. Its filename was
squashfs-verify-inode-mode-when-loading-from-disk.patch
This patch was dropped because it was merged into the mm-nonmm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Subject: squashfs: verify inode mode when loading from disk
Date: Wed, 13 Aug 2025 16:17:43 +0900
The inode mode loaded from corrupted disk might by error contain the file
type bits. Since the file type bits are set by squashfs_read_inode()
using bitwise OR, the file type bits must not be set by
squashfs_new_inode() from squashfs_read_inode(); otherwise, an invalid
file type bits later confuses may_open().
Link: https://lkml.kernel.org/r/f63d8d11-2254-4fc3-9292-9a43a93b374e@I-love.SAKURA.ne.jp
Reported-by: syzbot <syzbot+895c23f6917da440ed0d@syzkaller.appspotmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=895c23f6917da440ed0d
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reviewed-by: Phillip Lougher <phillip@squashfs.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
fs/squashfs/inode.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/fs/squashfs/inode.c~squashfs-verify-inode-mode-when-loading-from-disk
+++ a/fs/squashfs/inode.c
@@ -68,6 +68,10 @@ static int squashfs_new_inode(struct sup
inode->i_mode = le16_to_cpu(sqsh_ino->mode);
inode->i_size = 0;
+ /* File type must not be set at this moment, for it will later be set by the caller. */
+ if (inode->i_mode & S_IFMT)
+ err = -EIO;
+
return err;
}
_
Patches currently in -mm which might be from penguin-kernel@I-love.SAKURA.ne.jp are
ocfs2-kill-osb-system_file_mutex-lock.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-09-14 0:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-14 0:35 [merged mm-nonmm-stable] squashfs-verify-inode-mode-when-loading-from-disk.patch removed from -mm tree Andrew Morton
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.