Re: [PATCH] mm/ksm: avoid unsafe anon rmap dereference in KSM merge
From: Lorenzo Stoakes (ARM)
Date: Fri Nov 06 2026 - 05:16:53 EST
On Fri, Nov 06, 2026 at 10:43:45AM +0800, Zhao Gongyi wrote:
> I tested Lorenzo's posted patch on Linux 7.3.0-syz-13001714+
> with CONFIG_KSM=y, CONFIG_KASAN=y and CONFIG_SLUB_RCU_DEBUG=y.
>
> An earlier unpatched run of the fixed-pool KSM/mremap reproducer hit a
> KASAN slab-use-after-free in page_address_in_vma() after about 342 seconds.
> With the patch applied, the workload ran for 12 minutes (1027 KSM full
> scans) without KASAN, BUG or panic. The fork/COW smoke test passed.
>
> ksm_functional_tests reported 8 passes, 1 failure and 1 skip. The
> "ptrace write failed" failure is a known test-environment issue; dmesg
> showed no kernel error.
>
> Tested-by: Zhao Gongyi <zhaogongyi@xxxxxxxxxxxxx>
Thanks!
--
Cheers, Lorenzo