public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] Ignore cve-2022-2590_64bit CVE for Kernel versions below 5.16+
@ 2025-11-17  3:40 Wake Liu via ltp
  2025-11-18 18:03 ` Cyril Hrubis
  0 siblings, 1 reply; 6+ messages in thread
From: Wake Liu via ltp @ 2025-11-17  3:40 UTC (permalink / raw)
  To: ltp; +Cc: Wake Liu, Kodanda Rami Reddy V

From: Kodanda Rami Reddy V <quic_kreddyv@quicinc.com>

CVE 2022-2590_64bit is applicable only for kernel versions 5.16 onwards.
Add kernel version check to skip/Ignore the test case.
Test Module: vts_ltp_test_arm_64
Test Case: cve.cve-2022-2590_64bit#cve.cve-2022-2590_64bit
GBUG: 418679607

Change-Id: Ibbb18a168b727725faab2beb6841640e034fc468
---
 testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c b/testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c
index 2c7ad00f2..0651ae122 100644
--- a/testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c
+++ b/testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c
@@ -19,6 +19,7 @@
 #include <stdbool.h>
 #include <pwd.h>
 
+#include "tst_kvercmp.h"
 #include "tst_test.h"
 
 #define TMP_DIR "tmp_dirtyc0w_shmem"
@@ -41,6 +42,9 @@ static void sighandler(int sig)
 
 static void setup(void)
 {
+	if (tst_kvercmp(5, 16, 0) < 0) {
+		tst_brk(TCONF, "Test requires kernel 5.16.0 or newer for CVE-2022-2590 fix");
+	}
 	struct passwd *pw;
 
 	umask(0);
@@ -99,7 +103,9 @@ static void dirtyc0w_shmem_test(void)
 
 static void cleanup(void)
 {
-	SAFE_UMOUNT(TMP_DIR);
+	if (tst_kvercmp(5, 16, 0) >= 0) {
+		SAFE_UMOUNT(TMP_DIR);
+	}
 }
 
 static struct tst_test test = {
-- 
2.52.0.rc1.455.g30608eb744-goog


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-12-08  9:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-17  3:40 [LTP] [PATCH] Ignore cve-2022-2590_64bit CVE for Kernel versions below 5.16+ Wake Liu via ltp
2025-11-18 18:03 ` Cyril Hrubis
2025-11-21 16:15   ` Petr Vorel
2025-11-28  6:48   ` [LTP] [PATCH v2] dirtyc0w_shmem: Add minimum kernel version 6.0 check Madhu Ananthula via ltp
2025-12-04  7:22     ` Madhu Ananthula (Temp) via ltp
2025-12-08  9:38       ` Madhu Ananthula (Temp) via ltp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox