[LTP] [PATCH] Ignore cve-2022-2590_64bit CVE for Kernel versions below 5.16+
Wake Liu
wakel@google.com
Mon Nov 17 04:40:23 CET 2025
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
More information about the ltp
mailing list