From: "David Hildenbrand (Arm)" <david@kernel.org>
To: "Ackerley Tng" <ackerleytng@google.com>, 徐晗翔 <xuhx@hust.edu.cn>,
muchun.song@linux.dev, osalvador@suse.de,
akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: mm/hugetlb: a min_size-only hugetlbfs subpool is kfree()d before its last pinned page is released, so free_huge_folio() takes a spinlock on freed memory (UAF)
Date: Thu, 26 Nov 2026 07:39:16 +0100 [thread overview]
Message-ID: <72190fc0-e756-4442-a38c-7b8871e6a971@kernel.org> (raw)
In-Reply-To: <CAEvNRgFsS3ntQBANqaqdm5XS8c4n6KDh3aODiduf6pCczmBSGg@mail.gmail.com>
On 11/26/26 06:52, Ackerley Tng wrote:
> "David Hildenbrand (Arm)" <david@kernel.org> writes:
>
>> Hi Ackerley,
>>
>> does your series [1] actually fix this? What's the status of that?
>>
>> [1]
>> https://lore.kernel.org/linux-mm/20260916-hugetlb-subpool-always-track-used-v3-0-38aae9b5ccdd@google.com/
>>
>
> Hi!
>
> Yes, "mm/hugetlb: Track used_hpages when getting/putting pages from
> subpool" fixes this bug.
>
> I've been tied up with other work since [1] was posted.
>
> I have a set of reproducers locally for the various combinations of
> min_size, max_size, and both defined, while taking various paths
> (reservations vs actual allocations).
>
> The plan was to always track used_hpages, which simplifies the
> accounting and it does fix all the reproducers I have.
>
> I thought in addition to simplifying and fixing all those paths, it
> would always fix races, but AI showed me a repro with races that broke
> the model.
>
> Because of the repro, I planned to re-evaluate to see if there's a
> better model/clean fix but haven't got around to that.
>
> I'll try to get to it in the next few weeks?
Thanks. It's a UAF, so higher priority. But I think admin interaction is
required to trigger the UAF, so lower priority :)
--
Cheers,
David
prev parent reply other threads:[~2026-11-26 6:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4c7f9772.192e1.1a17d5c2ed5.Coremail.xuhx@hust.edu.cn>
[not found] ` <2026102727-data-sequel-ce41@gregkh>
2026-11-03 11:21 ` mm/slub: has_pcs_used() reads remote per-CPU sheaf state from flush_all_cpus_locked() without synchronization (data race; KCSAN blind spot: slub.o is uninstrumented) 徐晗翔
2026-11-04 9:41 ` Qing Wang
2026-11-04 10:07 ` Qing Wang
2026-11-22 7:37 ` mm/hugetlb: a min_size-only hugetlbfs subpool is kfree()d before its last pinned page is released, so free_huge_folio() takes a spinlock on freed memory (UAF) 徐晗翔
2026-11-22 15:58 ` David Hildenbrand (Arm)
2026-11-25 12:05 ` David Hildenbrand (Arm)
2026-11-26 5:52 ` Ackerley Tng
2026-11-26 6:39 ` David Hildenbrand (Arm) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=72190fc0-e756-4442-a38c-7b8871e6a971@kernel.org \
--to=david@kernel.org \
--cc=ackerleytng@google.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=muchun.song@linux.dev \
--cc=osalvador@suse.de \
--cc=xuhx@hust.edu.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox