We use these services and cookies to improve your user experience. You may opt out if you wish, however, this may limit some features on this site.

Please see our statement on Data Privacy.

Crisp.chat (Helpdesk and Chat)

Ok

THREATINT
PUBLISHED

CVE-2025-38447

mm/rmap: fix potential out-of-bounds page table access during batched unmap



Description

In the Linux kernel, the following vulnerability has been resolved: mm/rmap: fix potential out-of-bounds page table access during batched unmap As pointed out by David[1], the batched unmap logic in try_to_unmap_one() may read past the end of a PTE table when a large folio's PTE mappings are not fully contained within a single page table. While this scenario might be rare, an issue triggerable from userspace must be fixed regardless of its likelihood. This patch fixes the out-of-bounds access by refactoring the logic into a new helper, folio_unmap_pte_batch(). The new helper correctly calculates the safe batch size by capping the scan at both the VMA and PMD boundaries. To simplify the code, it also supports partial batching (i.e., any number of pages from 1 up to the calculated safe maximum), as there is no strong reason to special-case for fully mapped folios.

Reserved 2025-04-16 | Published 2025-07-25 | Updated 2025-07-25 | Assigner Linux

Product status

Default status
unaffected

354dffd29575cdf13154e8fb787322354aa9efc4 before 510fe9c15d07e765d96be9a9dc37e5057c6c09f4
affected

354dffd29575cdf13154e8fb787322354aa9efc4 before ddd05742b45b083975a0855ef6ebbf88cf1f532a
affected

Default status
affected

6.15
affected

Any version before 6.15
unaffected

6.15.7
unaffected

6.16-rc6
unaffected

References

git.kernel.org/...c/510fe9c15d07e765d96be9a9dc37e5057c6c09f4

git.kernel.org/...c/ddd05742b45b083975a0855ef6ebbf88cf1f532a

cve.org (CVE-2025-38447)

nvd.nist.gov (CVE-2025-38447)

Download JSON

Share this page
https://cve.threatint.eu/CVE/CVE-2025-38447

Support options

Helpdesk Chat, Email, Knowledgebase