Blame SOURCES/CVE-2023-1476.patch

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