[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240804212034.GE5334@ZenIV>
Date: Sun, 4 Aug 2024 22:20:34 +0100
From: Al Viro <viro@...iv.linux.org.uk>
To: Phillip Lougher <phillip@...ashfs.org.uk>
Cc: Lizhi Xu <lizhi.xu@...driver.com>, brauner@...nel.org, jack@...e.cz,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
squashfs-devel@...ts.sourceforge.net,
syzbot+24ac24ff58dc5b0d26b9@...kaller.appspotmail.com,
syzkaller-bugs@...glegroups.com
Subject: Re: [PATCH V7] squashfs: Add symlink size check in squash_read_inode
On Sun, Aug 04, 2024 at 10:16:05PM +0100, Phillip Lougher wrote:
> NACK. I see no reason to introduce an intermediate variable here.
>
> Please do what Al Viro suggested.
Alternatively, just check ->i_size after assignment. loff_t is
always a 64bit signed; le32_to_cpu() returns 32bit unsigned.
Conversion from u32 to s64 is always going to yield a non-negative
result; comparison with PAGE_SIZE is all you need there.
Powered by blists - more mailing lists