AZL-115942: CVE-2026-99669 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
mm/hugememory: fix truncate racing with PMD zapping
zaphugepmdfolio() removes the rmap before calling foliomarkdirty(). If this was the last mapping, truncation can skip unmapping the folio and proceed without waiting for the PMD lock, racing with dirtying.
ifssetrangedirty() can oops if MADVDONTNEED races with ftruncate() on XFS, when we get the folio set dirty after it was found to not be mapped anymore.
Move foliomarkdirty() and foliomarkaccessed() before rmap removal, matching the PTE zap path. This keeps the folio mapped while updating its state, so truncation must wait for the page table lock.
Fix generated by an LLM and sent by Chris Mason in private.
[ david: simplify comment and description ]