AZL-115450: CVE-2026-99651 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
mm/ksm: reset the unstable trees of all nodes
Each full scan resets ksmnrnodeids unstable tree roots. Enabling mergeacrossnodes resets this count to 1, even if per-node roots were previously allocated.
So when toggling "mergeacrossnodes" 0 -> 1 -> 0, a scan that starts while the setting is 1 and continues after switching back to 0 can encounter stale unstable tree roots, resulting in UAF.
Only root is allowed to change "mergeacrossnodes", and the documented sequence is: "mergeacrossnodes setting can be changed only when there are no ksm shared pages in the system: set run 2 to unmerge pages first, then to 1 after changing mergeacrossnodes, to remerge according to the new setting."
Let's fix it by tracking in ksmnrnodeids the actual number of allocated tree roots.
removeallstablenodes() and ksmcheckstabletree() will now scan more tree roots (skipping the empty ones), which is harmless.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Set run to 2 to unmerge KSM pages before changing merge_across_nodes; after the change, set run to 1 to remerge pages under the new setting.
Linux kernel KSM run = 2, then 1