Skip to contentSkip to conversation

crypto/af_alg07: Skip this case when not having sockfs_setattr

PATCH New Yang Xu 2 participants 2 messages Oct 6, 2020 – Oct 7, 2020

lore
Share & tools
lore

Yang Xu

author
#0 lore raw

PATCH 1/1 crypto/af_alg07: Skip this case when not having sockfs_setattr

Since kernel 4.10-rc1 commit 86741ec25462 ("net: core: Add a UID field to struct sock."), it introduced sockfs_setattr function. This test needs to use this function to trigger this cve bug, so skip it if kernel < 4.10.

---
 testcases/kernel/crypto/af_alg07.c | 1 +
 1 file changed, 1 insertion(+)
testcases/kernel/crypto/af_alg07.c +1 -0
index 270197bb0..6ad86f4f3 100644
@@ -109,6 +109,7 @@ static struct tst_test test = {
 	.test_all = run,
 	.setup = setup,
 	.cleanup = cleanup,
+	.min_kver = "4.10.0",
 	.taint_check = TST_TAINT_W | TST_TAINT_D,
 	.tags = (const struct tst_tag[]) {
 		{"linux-git", "9060cb719e61"},
Signature · 1 line
2.23.0
#1 lore raw

PATCH 1/1 crypto/af_alg07: Skip this case when not having sockfs_setattr

----- Original Message -----

Quoted 11 lines

From: "Yang Xu" <[email protected]>
To: [email protected]
Sent: Tuesday, 6 October, 2020 8:47:55 AM
Subject: [LTP] [PATCH] crypto/af_alg07: Skip this case when not having sockfs_setattr

Since kernel 4.10-rc1 commit 86741ec25462 ("net: core: Add a UID field to struct sock."),
it introduced sockfs_setattr function. This test needs to use this function to trigger this cve bug, so skip it if kernel < 4.10.

Pushed.

Thanks,
Jan