[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20260120094617.ed5a53e9ec40e8f0a91f8cb6@linux-foundation.org>
Date: Tue, 20 Jan 2026 09:46:17 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Pimyn Girgis <pimyn@...gle.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org, elver@...gle.com,
dvyukov@...gle.com, glider@...gle.com, kasan-dev@...glegroups.com,
stable@...r.kernel.org
Subject: Re: [PATCH] mm/kfence: randomize the freelist on initialization
On Tue, 20 Jan 2026 17:15:10 +0100 Pimyn Girgis <pimyn@...gle.com> wrote:
> Randomize the KFENCE freelist during pool initialization to make allocation
> patterns less predictable. This is achieved by shuffling the order in which
> metadata objects are added to the freelist using get_random_u32_below().
>
> Additionally, ensure the error path correctly calculates the address range
> to be reset if initialization fails, as the address increment logic has
> been moved to a separate loop.
>
> Cc: stable@...r.kernel.org
> Fixes: 0ce20dd84089 ("mm: add Kernel Electric-Fence infrastructure")
It isn't clear (to me) what was wrong with 0ce20dd84089, nor why a
-stable backport is proposed.
Can we please have a full description of the current misbehavior? What
are the worst-case userspace-visible effects of this flaw?
Powered by blists - more mailing lists