Skip to contentSkip to conversation

Ignore cve-2022-2590_64bit CVE for Kernel versions below 5.16+

PATCH In review Wake Liu via ltp 3 participants 6 messages Nov 18, 2025 – Dec 8, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Ignore cve-2022-2590_64bit CVE for Kernel versions below 5.16+

From: Kodanda Rami Reddy V <[email protected]>

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(-)
testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c +7 -1
index 2c7ad00f2..0651ae122 100644
@@ -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 = {
Signature · 5 lines
2.52.0.rc1.455.g30608eb744-goog


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#1 lore raw

Hi!

Quoted 1 line

CVE 2022-2590_64bit is applicable only for kernel versions 5.16 onwards.

Why? What happens if you run the test on an older kernel? This information should be written here.

Quoted 23 lines

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(-)
testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c +1 -0
index 2c7ad00f2..0651ae122 100644
@@ -19,6 +19,7 @@
 #include <stdbool.h>
 #include <pwd.h>
 
+#include "tst_kvercmp.h"
 #include "tst_test.h"
 
 #define TMP_DIR "tmp_dirtyc0w_shmem"

testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c static void sighandler(int sig) · line 47

Quoted 6 lines
testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c +3 -0
@@ -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");
+	}

You should use the .min_kver field in the tst_test structure instead.

Signature · 5 lines
Cyril Hrubis
[email protected]

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#2 lore raw

Hi Kodanda, all,

Quoted 2 lines

Hi!

Quoted 1 line

CVE 2022-2590_64bit is applicable only for kernel versions 5.16 onwards.

The fix 5535be309971 (actually FOLL_COW removal) was merged into v6.0-rc3. Probably because this is feature change it was not merged into 5.15 stable and the older trees. If we want to mask older kernels IMHO it should be on kernels older than 6.0.

But we don't want to hide bugs, right?

Quoted 6 lines

Why? What happens if you run the test on an older kernel? This information should be written here.

Quoted 3 lines

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

very nit: the subject should not have "_64bit".

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#3 lore raw

PATCH v2 1/1 dirtyc0w_shmem: Add minimum kernel version 6.0 check

In reply to Cyril Hrubis

The CVE 2022-2590 vulnerability applicable only on kernels 6.0 and above. Add min_kver = "6.0" to skip the test on older kernels.

Test Module: vts_ltp_test_arm_64
Test Case: cve.cve-2022-2590_64bit#cve.cve-2022-2590_64bit
GBUG: 418679607

---
 testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c | 1 +
 1 file changed, 1 insertion(+)
testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c +1 -0
index 2c7ad00f2..9cf495704 100644
@@ -103,6 +103,7 @@ static void cleanup(void)
 }
 
 static struct tst_test test = {
+	.min_kver = "6.0",
 	.needs_checkpoints = 1,
 	.child_needs_reinit =1,
 	.forks_child = 1,
Signature · 5 lines
2.25.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#4 lore raw

Re: [LTP] [PATCH v2] dirtyc0w_shmem: Add minimum kernel version 6.0 check

Hi Team,

Gentle Reminder

Can you help to merge this PR https://github.com/linux-test-project/ltp/pull/1274

Updated the V2 Patch with Review comments.

Thanks,
Madhu

-----Original Message-----
From: Madhu Ananthula (Temp) <[email protected]>
Sent: Friday, November 28, 2025 12:18 PM
To: [email protected]
Cc: Wake Liu <[email protected]>; Kodanda Rami Reddy V (Temp) (QUIC) <[email protected]>; Prasanna Kumar <[email protected]>; Madhu Ananthula (Temp) <[email protected]>
Subject: [PATCH v2] dirtyc0w_shmem: Add minimum kernel version 6.0 check

The CVE 2022-2590 vulnerability applicable only on kernels 6.0 and above. Add min_kver = "6.0" to skip the test on older kernels.

Test Module: vts_ltp_test_arm_64
Test Case: cve.cve-2022-2590_64bit#cve.cve-2022-2590_64bit
GBUG: 418679607

---
 testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c | 1 +
 1 file changed, 1 insertion(+)
testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c +1 -1
index 2c7ad00f2..9cf495704 100644
@@ -103,6 +103,7 @@ static void cleanup(void)  }
 
 static struct tst_test test = {
+	.min_kver = "6.0",
 	.needs_checkpoints = 1,
 	.child_needs_reinit =1,
 	.forks_child = 1,
--

2.25.1

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#5 lore raw

Re: [LTP] [PATCH v2] dirtyc0w_shmem: Add minimum kernel version 6.0 check

Hi Team,

Can you help to merge this PR?

https://github.com/linux-test-project/ltp/pull/1274

Thanks,
Madhu

-----Original Message-----
From: Madhu Ananthula (Temp)
Sent: Thursday, December 4, 2025 12:52 PM
To: [email protected]; '[email protected]' <[email protected]>
Cc: Wake Liu <[email protected]>; Kodanda Rami Reddy V (Temp) (QUIC) <[email protected]>; Prasanna Kumar <[email protected]>
Subject: RE: [PATCH v2] dirtyc0w_shmem: Add minimum kernel version 6.0 check

Hi Team,

Gentle Reminder

Can you help to merge this PR https://github.com/linux-test-project/ltp/pull/1274

Updated the V2 Patch with Review comments.

Thanks,
Madhu

-----Original Message-----
From: Madhu Ananthula (Temp) <[email protected]>
Sent: Friday, November 28, 2025 12:18 PM
To: [email protected]
Cc: Wake Liu <[email protected]>; Kodanda Rami Reddy V (Temp) (QUIC) <[email protected]>; Prasanna Kumar <[email protected]>; Madhu Ananthula (Temp) <[email protected]>
Subject: [PATCH v2] dirtyc0w_shmem: Add minimum kernel version 6.0 check

The CVE 2022-2590 vulnerability applicable only on kernels 6.0 and above. Add min_kver = "6.0" to skip the test on older kernels.

Test Module: vts_ltp_test_arm_64
Test Case: cve.cve-2022-2590_64bit#cve.cve-2022-2590_64bit
GBUG: 418679607

---
 testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c | 1 +
 1 file changed, 1 insertion(+)
testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c +1 -1
index 2c7ad00f2..9cf495704 100644
@@ -103,6 +103,7 @@ static void cleanup(void)  }
 
 static struct tst_test test = {
+	.min_kver = "6.0",
 	.needs_checkpoints = 1,
 	.child_needs_reinit =1,
 	.forks_child = 1,
--

2.25.1

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp