diff mbox series

crypto/af_alg07: Skip this case when not having sockfs_setattr

Message ID 1601966875-5375-1-git-send-email-xuyang2018.jy@cn.fujitsu.com
State Accepted, archived
Headers show
Series crypto/af_alg07: Skip this case when not having sockfs_setattr | expand

Commit Message

Yang Xu Oct. 6, 2020, 6:47 a.m. UTC
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.

Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
---
 testcases/kernel/crypto/af_alg07.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jan Stancek Oct. 7, 2020, 11:03 a.m. UTC | #1
----- Original Message -----
> From: "Yang Xu" <xuyang2018.jy@cn.fujitsu.com>
> To: ltp@lists.linux.it
> 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.
> 
> Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>

Pushed.

Thanks,
Jan
diff mbox series

Patch

diff --git a/testcases/kernel/crypto/af_alg07.c b/testcases/kernel/crypto/af_alg07.c
index 270197bb0..6ad86f4f3 100644
--- a/testcases/kernel/crypto/af_alg07.c
+++ b/testcases/kernel/crypto/af_alg07.c
@@ -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"},