[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <023b6204-ad41-42e8-ad24-6d704ef3cd6c@squashfs.org.uk>
Date: Sun, 4 Aug 2024 23:31:51 +0100
From: Phillip Lougher <phillip@...ashfs.org.uk>
To: Al Viro <viro@...iv.linux.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 04/08/2024 22:20, Al Viro wrote:
> 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.
I'm happy with that as well.
Thanks
Phillip
Powered by blists - more mailing lists