lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bbe602bd-c421-4dd6-ad17-9cff39a3c097@huaweicloud.com>
Date: Wed, 30 Apr 2025 11:32:04 +0800
From: Zhang Yi <yi.zhang@...weicloud.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: linux-ext4@...r.kernel.org, linux-fsdevel@...r.kernel.org,
 linux-kernel@...r.kernel.org, tytso@....edu, adilger.kernel@...ger.ca,
 jack@...e.cz, wanghaichi0403@...il.com, yi.zhang@...wei.com,
 libaokun1@...wei.com, yukuai3@...wei.com, yangerkun@...wei.com
Subject: Re: [PATCH 4/4] ext4: ensure i_size is smaller than maxbytes

On 2025/4/30 11:20, Matthew Wilcox wrote:
> On Wed, Apr 30, 2025 at 09:13:01AM +0800, Zhang Yi wrote:
>> From: Zhang Yi <yi.zhang@...wei.com>
>>
>> The inode i_size cannot be larger than maxbytes, check it while loading
>> inode from the disk.
> 
> With this patch, why do we need patch 1?

The max_end in ext4_punch_hole() is maxbytes - blocksize. Therefore,
without the patch 1, it is still possible to encounter a negative
length if the offset exceeds max_end but is less than an i_size that
also exceeds max_end.

                 max_end    i_size  max_bytes
                    |         |        |
   0------------------------------------
                            |
                         offset

Thanks,
Yi.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ