All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wake Liu via ltp <ltp@lists.linux.it>
To: ltp@lists.linux.it
Cc: Wake Liu <wakel@google.com>,
	Kodanda Rami Reddy V <quic_kreddyv@quicinc.com>
Subject: [LTP] [PATCH] Ignore cve-2022-2590_64bit CVE for Kernel versions below 5.16+
Date: Mon, 17 Nov 2025 11:40:23 +0800	[thread overview]
Message-ID: <20251117034023.415246-1-wakel@google.com> (raw)

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

             reply	other threads:[~2025-11-18 17:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-17  3:40 Wake Liu via ltp [this message]
2025-11-18 18:03 ` [LTP] [PATCH] Ignore cve-2022-2590_64bit CVE for Kernel versions below 5.16+ 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251117034023.415246-1-wakel@google.com \
    --to=ltp@lists.linux.it \
    --cc=quic_kreddyv@quicinc.com \
    --cc=wakel@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.