Re: [BUG] KASAN: user-memory-access in free_pgtables

From: Kairui Song

Date: Wed Apr 29 2026 - 04:46:17 EST


On Mon, Apr 27, 2026 at 4:09 PM David Hildenbrand (Arm)
<david@xxxxxxxxxx> wrote:
>
> On 4/25/26 11:50, Huang Forrest wrote:
> > Hello,
>
> CCing swap folks. Did any of the bigger swap reworks go into v7.0 that could
> cause this?

Thanks for the Cc.

>
> It could also just be a corrupted PTE I guess.
>

I think it is more likely a corrupted PTE issue indeed. Corrupted PTE
often causes WARN from swap side on process exit / unmap zap, the swap
file entry reported here looks like random garbage, not an entry
allocated from swap.

Swap free helper will just return and do nothing after that WARN,
following panic is likely caused by other corrupted memory or bug.