mm: fix deferred split queue races during migration
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux | — |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux | — |
|
In the Linux kernel, the following vulnerability has been resolved:
mm: fix deferred split queue races during migration
migrate_folio_move() records the deferred split queue state from src and replays it on dst. Replaying it after remove_migration_ptes(src, dst, 0) makes dst visible before it is requeued, so a concurrent rmap-removal path can mark dst partially mapped and trip the WARN in deferred_split_folio().
Move the requeue before remove_migration_ptes() so dst is back on the deferred split queue before it becomes visible again.
Because migration still holds dst locked at that point, teach deferred_split_scan() to requeue a folio when folio_trylock() fails. Otherwise a fully mapped underused folio can be dequeued by the shrinker and silently lost from split_queue.
[ziy@nvidia.com: move the comment]
From the CVE record · Linux
A race in Linux kernel folio migration can make a destination folio visible before it returns to the deferred split queue. Concurrent reverse-mapping removal can trigger a warning; a shrinker scan can also silently lose a folio from the queue. The input does not specify attacker access requirements or user interaction.
Engineers running Linux kernels with the affected memory-management code should check their deployments; affected versions are not specified.