Skip to content

[CVE-2022-39188] mmu_gather: Force tlb-flush VM_PFNMAP vmas - #803

Open
TrietHoang-DL wants to merge 1 commit into
Freescale:5.15-2.2.x-imxfrom
TrietHoang-DL:CVE-2022-39188/5.15-2.2.x-imx
Open

[CVE-2022-39188] mmu_gather: Force tlb-flush VM_PFNMAP vmas#803
TrietHoang-DL wants to merge 1 commit into
Freescale:5.15-2.2.x-imxfrom
TrietHoang-DL:CVE-2022-39188/5.15-2.2.x-imx

Conversation

@TrietHoang-DL

Copy link
Copy Markdown

[ Upstream commit b67fbeb ]

Jann reported a race between munmap() and unmap_mapping_range(), where unmap_mapping_range() will no-op once unmap_vmas() has unlinked the VMA; however munmap() will not yet have invalidated the TLBs.

Therefore unmap_mapping_range() will complete while there are still (stale) TLB entries for the specified range.

Mitigate this by force flushing TLBs for VM_PFNMAP ranges.

Acked-by: Will Deacon will@kernel.org

[ Upstream commit b67fbeb ]

Jann reported a race between munmap() and unmap_mapping_range(), where
unmap_mapping_range() will no-op once unmap_vmas() has unlinked the
VMA; however munmap() will not yet have invalidated the TLBs.

Therefore unmap_mapping_range() will complete while there are still
(stale) TLB entries for the specified range.

Mitigate this by force flushing TLBs for VM_PFNMAP ranges.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Triet Hoang <triet.hoang@datalogic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant