Skip to contentSkip to conversation

pty04: Correct struct member sizes and add to CVE runtest file

PATCH New Richard Palethorpe 4 participants 6 messages May 6, 2020 – May 7, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pty04: Correct struct member sizes and add to CVE runtest file

Also remove min_kver because it is arbitrary. We know this test works on much older kernels, but it will probably hit bugs that have been fixed for a long time.

---
 runtest/cve                  |  1 +
 testcases/kernel/pty/pty04.c | 11 +++++------
 2 files changed, 6 insertions(+), 6 deletions(-)
runtest/cve +1 -0
index c2e9e8c89..b9ab49c3b 100644
@@ -50,3 +50,4 @@ cve-2018-1000199 ptrace08
 cve-2018-1000204 ioctl_sg01
 cve-2018-18559 bind06
 cve-2018-19854 crypto_user01
+cve-2020-11494 pty04
testcases/kernel/pty/pty04.c +5 -6
index 239d2a870..2b9ff7e45 100644
@@ -58,11 +58,11 @@ typedef uint32_t canid_t;
 
 struct can_frame {
 	canid_t can_id;
-	uint32_t can_dlc;
-	uint32_t __pad;
-	uint32_t __res0;
-	uint32_t __res1;
-	uint32_t data[CAN_MAX_DLEN] __attribute__((aligned(8)));
+	uint8_t can_dlc;
+	uint8_t __pad;
+	uint8_t __res0;
+	uint8_t __res1;
+	uint8_t data[CAN_MAX_DLEN] __attribute__((aligned(8)));
 };
 
 #include <stddef.h>
@@ -366,7 +366,6 @@ static struct tst_test test = {
 	.forks_child = 1,
 	.needs_checkpoints = 1,
 	.needs_root = 1,
-	.min_kver = "4.10",
 	.tags = (const struct tst_tag[]){
 		{"linux-git", "b9258a2cece4ec1f020715fe3554bc2e360f6264"},
 		{"CVE", "CVE-2020-11494"},
Signature · 1 line
2.26.1
#1 lore raw

PATCH 1/1 pty04: Correct struct member sizes and add to CVE runtest file

Hi Richard,

Quoted 3 lines

Also remove min_kver because it is arbitrary. We know this test works on much older kernels, but it will probably hit bugs that have been fixed for a long time.

Thanks!

Waiting for reactions to .min_kver removal.
nit: I might separate runtest change into it's own commit.

Kind regards,
Petr

#2 lore raw

PATCH 1/1 pty04: Correct struct member sizes and add to CVE runtest file

Quoted 4 lines · Petr Vorel

Hi Richard,

Quoted 1 line

Also remove min_kver because it is arbitrary. We know this test works on

much

Quoted 9 lines
Quoted 1 line

older kernels, but it will probably hit bugs that have been fixed for a

long

Quoted 1 line

time.

Thanks!

Waiting for reactions to .min_kver removal.

Removing .min_kver = "4.10" is fine by me, it works on rhel6/7/8 from my test. The test failure seems related to the unfix kernel problem.

nit: I might separate runtest change into it's own commit.

Quoted 1 line

Also to add #define CAN_MTU (sizeof(struct can_frame)).

Quoted 7 lines

Kind regards,
Petr

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

Signature · 5 lines
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20200507/b415096e/attachment.htm>
#3 lore raw

PATCH 1/1 pty04: Correct struct member sizes and add to CVE runtest file

Hi!

Quoted 1 line

nit: I might separate runtest change into it's own commit.

Agree here, the runtest change should be separated.

Signature · 2 lines
Cyril Hrubis
[email protected]
Applied
#4 lore raw

PATCH 1/1 pty04: Correct struct member sizes and add to CVE runtest file

Hi all,

Quoted 4 lines

Hi!

Quoted 1 line

nit: I might separate runtest change into it's own commit.

Agree here, the runtest change should be separated.

+1.

Merged, thanks for a fix!

We still have time to comment out the test if #674 won't be fixed before release.

Kind regards,
Petr

https://github.com/linux-test-project/ltp/issues/674

#5 lore raw

PATCH 1/1 pty04: Correct struct member sizes and add to CVE runtest file

In reply to Richard Palethorpe

Hi Richard,

...

runtest/cve cve-2018-1000199 ptrace08 · line 53

Quoted 6 lines

+++ b/runtest/cve

runtest/cve +1 -0
@@ -50,3 +50,4 @@ cve-2018-1000199 ptrace08
 cve-2018-1000204 ioctl_sg01
 cve-2018-18559 bind06
 cve-2018-19854 crypto_user01
+cve-2020-11494 pty04

BTW Also Jan was proposing to disable test in runtest.

But it'd be great to fix that before release, so I'm ok to take merge it (we can disable it in both pty and cve runtest files just before release).

Kind regards,
Petr