diff mbox series

[uclibc-ng-devel,2/2] fix for CVE-2022-29503

Message ID CANP1oa3VcYqJad8yzDmFWhy7s7pQoMihxndToLfap4paJor1Yg@mail.gmail.com
State New
Headers show
Series [uclibc-ng-devel,1/2] fix for CVE-2022-29503 | expand

Commit Message

linted Jan. 21, 2023, 9:24 p.m. UTC
Hello,
This patch adds the MAP_FIXED_NOREPLACE flag which hasn't made its way into
uclibc-ng yet.

From c72a664b4bf44bc0d069068b5eed2b62ead35b19 Mon Sep 17 00:00:00 2001
From: linted <linted@users.noreply.github.com>
Date: Sat, 21 Jan 2023 16:19:23 -0500
Subject: [PATCH 2/2] Defined MAP_FIXED_NOREPLACE

Added definition for MAP_FIXED_NOREPLACE which was added in kernel 4.17

Signed-off-by: linted <linted@users.noreply.github.com>
---
 libc/sysdeps/linux/common/bits/mman-linux.h | 1 +
 1 file changed, 1 insertion(+)

 # ifdef __MAP_ANONYMOUS
diff mbox series

Patch

From c72a664b4bf44bc0d069068b5eed2b62ead35b19 Mon Sep 17 00:00:00 2001
From: linted <linted@users.noreply.github.com>
Date: Sat, 21 Jan 2023 16:19:23 -0500
Subject: [PATCH 2/2] Defined MAP_FIXED_NOREPLACE

Added definition for MAP_FIXED_NOREPLACE which was added in kernel 4.17

Signed-off-by: linted <linted@users.noreply.github.com>
---
 libc/sysdeps/linux/common/bits/mman-linux.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libc/sysdeps/linux/common/bits/mman-linux.h b/libc/sysdeps/linux/common/bits/mman-linux.h
index 6ca08415a..4947ddd89 100644
--- a/libc/sysdeps/linux/common/bits/mman-linux.h
+++ b/libc/sysdeps/linux/common/bits/mman-linux.h
@@ -46,6 +46,7 @@ 
 
 /* Other flags.  */
 #define MAP_FIXED	0x10		/* Interpret addr exactly.  */
+# define MAP_FIXED_NOREPLACE 0x100000 /* Used to solve problem with MAP_FIXED */
 #ifdef __USE_MISC
 # define MAP_FILE	0
 # ifdef __MAP_ANONYMOUS
-- 
2.34.1