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

* Re: [LTP] [PATCH] Ignore cve-2022-2590_64bit CVE for Kernel versions below 5.16+
  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
  0 siblings, 2 replies; 6+ messages in thread
From: Cyril Hrubis @ 2025-11-18 18:03 UTC (permalink / raw)
  To: Wake Liu; +Cc: Kodanda Rami Reddy V, ltp

Hi!
> 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.

> 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");
> +	}

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

-- 
Cyril Hrubis
chrubis@suse.cz

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

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

* Re: [LTP] [PATCH] Ignore cve-2022-2590_64bit CVE for Kernel versions below 5.16+
  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
  1 sibling, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2025-11-21 16:15 UTC (permalink / raw)
  To: Cyril Hrubis; +Cc: Wake Liu, Kodanda Rami Reddy V, ltp

Hi Kodanda, all,

> Hi!
> > 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?

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

> > 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

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

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

* [LTP] [PATCH v2] dirtyc0w_shmem: Add minimum kernel version 6.0 check
  2025-11-18 18:03 ` Cyril Hrubis
  2025-11-21 16:15   ` Petr Vorel
@ 2025-11-28  6:48   ` Madhu Ananthula via ltp
  2025-12-04  7:22     ` Madhu Ananthula (Temp) via ltp
  1 sibling, 1 reply; 6+ messages in thread
From: Madhu Ananthula via ltp @ 2025-11-28  6:48 UTC (permalink / raw)
  To: ltp; +Cc: Madhu Ananthula, Wake Liu, Kodanda Rami Reddy V, Prasanna Kumar

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

Signed-off-by: Madhu Ananthula <mananthu@qti.qualcomm.com>
---
 testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c b/testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c
index 2c7ad00f2..9cf495704 100644
--- a/testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c
+++ b/testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c
@@ -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


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

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

* Re: [LTP] [PATCH v2] dirtyc0w_shmem: Add minimum kernel version 6.0 check
  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
  0 siblings, 1 reply; 6+ messages in thread
From: Madhu Ananthula (Temp) via ltp @ 2025-12-04  7:22 UTC (permalink / raw)
  To: ltp@lists.linux.it, chrubis@suse.cz
  Cc: Wake Liu, Kodanda Rami Reddy V (Temp) (QUIC), Prasanna Kumar

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) <mananthu@qti.qualcomm.com> 
Sent: Friday, November 28, 2025 12:18 PM
To: ltp@lists.linux.it
Cc: Wake Liu <wakel@google.com>; Kodanda Rami Reddy V (Temp) (QUIC) <quic_kreddyv@quicinc.com>; Prasanna Kumar <kprasan@qti.qualcomm.com>; Madhu Ananthula (Temp) <mananthu@qti.qualcomm.com>
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

Signed-off-by: Madhu Ananthula <mananthu@qti.qualcomm.com>
---
 testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c b/testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c
index 2c7ad00f2..9cf495704 100644
--- a/testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c
+++ b/testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c
@@ -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


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

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

* Re: [LTP] [PATCH v2] dirtyc0w_shmem: Add minimum kernel version 6.0 check
  2025-12-04  7:22     ` Madhu Ananthula (Temp) via ltp
@ 2025-12-08  9:38       ` Madhu Ananthula (Temp) via ltp
  0 siblings, 0 replies; 6+ messages in thread
From: Madhu Ananthula (Temp) via ltp @ 2025-12-08  9:38 UTC (permalink / raw)
  To: ltp@lists.linux.it, chrubis@suse.cz, rbranco@suse.de
  Cc: Wake Liu, Kodanda Rami Reddy V (Temp) (QUIC), Prasanna Kumar

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: ltp@lists.linux.it; 'chrubis@suse.cz' <chrubis@suse.cz>
Cc: Wake Liu <wakel@google.com>; Kodanda Rami Reddy V (Temp) (QUIC) <quic_kreddyv@quicinc.com>; Prasanna Kumar <kprasan@qti.qualcomm.com>
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) <mananthu@qti.qualcomm.com> 
Sent: Friday, November 28, 2025 12:18 PM
To: ltp@lists.linux.it
Cc: Wake Liu <wakel@google.com>; Kodanda Rami Reddy V (Temp) (QUIC) <quic_kreddyv@quicinc.com>; Prasanna Kumar <kprasan@qti.qualcomm.com>; Madhu Ananthula (Temp) <mananthu@qti.qualcomm.com>
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

Signed-off-by: Madhu Ananthula <mananthu@qti.qualcomm.com>
---
 testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c b/testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c
index 2c7ad00f2..9cf495704 100644
--- a/testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c
+++ b/testcases/kernel/security/dirtyc0w_shmem/dirtyc0w_shmem.c
@@ -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


-- 
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