From 42a30a3ccd07e1f9853ee0cc03c314fdf3550fc1 Mon Sep 17 00:00:00 2001
From: Joe Lawrence <joe.lawrence@redhat.com>
Date: Fri, 17 Mar 2023 18:07:47 -0400
Subject: [KPATCH CVE-2022-1476] kpatch fixes for CVE-2022-1476
Kernels:
4.18.0-425.3.1.el8
4.18.0-425.10.1.el8_7
4.18.0-425.13.1.el8_7
Kpatch-MR: https://gitlab.com/redhat/prdsc/rhel/src/kpatch/rhel-8/-/merge_requests/93
Approved-by: Yannick Cote (@ycote1)
Changes since last build:
arches: x86_64 ppc64le
---------------------------
Modifications:
- Kpatch only
The 8.7 kpatch fix for CVE-2022-41222 was incomplete. Adjust the PMD
page table case as well.
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
---
mm/mremap.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/mm/mremap.c b/mm/mremap.c
index d837de27011b..08d35ee99afc 100644
--- a/mm/mremap.c
+++ b/mm/mremap.c
@@ -307,12 +307,10 @@ unsigned long move_page_tables(struct vm_area_struct *vma,
*/
bool moved;
- if (need_rmap_locks)
- take_rmap_locks(vma);
+ take_rmap_locks(vma);
moved = move_normal_pmd(vma, old_addr, new_addr,
old_end, old_pmd, new_pmd);
- if (need_rmap_locks)
- drop_rmap_locks(vma);
+ drop_rmap_locks(vma);
if (moved)
continue;
#endif
--
2.39.2