Blame SOURCES/CVE-2023-1476.patch

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