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: <330ed547-aeab-46d9-84b1-0d0dc0095943@huaweicloud.com>
Date: Sun, 29 Sep 2024 09:29:08 +0800
From: Baokun Li <libaokun@...weicloud.com>
To: Eric Sandeen <sandeen@...hat.com>
Cc: linux-ext4@...r.kernel.org, tytso@....edu, adilger.kernel@...ger.ca,
 jack@...e.cz, linux-kernel@...r.kernel.org, yi.zhang@...wei.com,
 yangerkun@...wei.com, Baokun Li <libaokun1@...wei.com>,
 Wesley Hershberger <wesley.hershberger@...onical.com>,
 Stéphane Graber <stgraber@...raber.org>,
 Alexander Mikhalitsyn <aleksandr.mikhalitsyn@...onical.com>,
 stable@...r.kernel.org, Yang Erkun <yangerkun@...wei.com>
Subject: Re: [PATCH v2] ext4: fix off by one issue in alloc_flex_gd()

On 2024/9/27 22:14, Eric Sandeen wrote:
> On 9/27/24 8:33 AM, libaokun@...weicloud.com wrote:
>> From: Baokun Li <libaokun1@...wei.com>
>>
> ...
>
>> Delete the problematic plus 1 to fix the issue, and add a WARN_ON_ONCE()
>> to prevent the issue from happening again.
>>
>> Reported-by: Wesley Hershberger <wesley.hershberger@...onical.com>
>> Closes: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2081231
>> Reported-by: Stéphane Graber <stgraber@...raber.org>
>> Closes: https://lore.kernel.org/all/20240925143325.518508-1-aleksandr.mikhalitsyn@canonical.com/
>> Tested-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@...onical.com>
>> Tested-by: Eric Sandeen <sandeen@...hat.com>
> The patch has changed a little since I tested, but it still passes my testcase
> (as expected, no WARN ON etc) so looks good from that POV, thanks!
> -Eric

Hi Eric,

Thanks for testing it again!

The core modification logic remains unchanged from before.
Just added a max_resize_bg variable for exception fixing.

It is necessary to ensure that flex_gd->resize_bg does not exceed the
smaller of flexbg_size and MAX_RESIZE_BG before it is used. So we need
to record max_resize_bg, warn on resize_bg adjustment logic exceptions,
and use max_resize_bg to avoid subsequent resize complaints.


-- 
With Best Regards,
Baokun Li


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ