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] [day] [month] [year] [list]
Date:   Thu, 28 Jan 2021 09:46:33 +0800
From:   Miaohe Lin <linmiaohe@...wei.com>
To:     Andrew Morton <akpm@...ux-foundation.org>
CC:     Mike Kravetz <mike.kravetz@...cle.com>, <linux-mm@...ck.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm/hugetlb: Fix use after free when subpool max_hpages
 accounting is not enabled

Hi:
On 2021/1/28 8:17, Andrew Morton wrote:
> On Wed, 27 Jan 2021 10:08:22 +0800 Miaohe Lin <linmiaohe@...wei.com> wrote:
> 
>> On 2021/1/27 8:06, Mike Kravetz wrote:
>>> On 1/26/21 3:55 AM, Miaohe Lin wrote:
>>>> When subpool max_hpages accounting is not enabled, used_hpages is always 0
>>>> and might lead to release subpool prematurely because it indicates no pages
>>>> are used now while there might be.
>>>
>>> It might be good to say that you need min_hpages accounting (min_size mount
>>> option) enabled for this issue to occur.  Or, perhaps say this is possible
>>> if a hugetlbfs filesystem is created with the min_size option and without
>>> the size option.
>>>
>>> That might better explain the conditions in which a user could see the issue.
>>
>> So commit log might looks like this ?
>> """
>> If a hugetlbfs filesystem is created with the min_size option and without
>> the size option, used_hpages is always 0 and might lead to release subpool
>> prematurely because it indicates no pages are used now while there might
>> be.
>>
>> In order to fix this issue, we should check used_hpages == 0 iff max_hpages
>> accounting is enabled. As max_hpages accounting should be enabled in most
>> common case, this is not worth a Cc stable.
>> """
>>
>> If so, should I send a V2 or Andrew would kindly do this?
>> Many thanks.
> 
> I made that change, thanks.>

It's very kind of you. Many thanks.:)

> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ