All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] pty04: Correct struct member sizes and add to CVE runtest file
@ 2020-05-06 17:04 Richard Palethorpe
  2020-05-06 17:19 ` Petr Vorel
  2020-05-07  8:12 ` Petr Vorel
  0 siblings, 2 replies; 6+ messages in thread
From: Richard Palethorpe @ 2020-05-06 17:04 UTC (permalink / raw)
  To: ltp

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.

Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
---
 runtest/cve                  |  1 +
 testcases/kernel/pty/pty04.c | 11 +++++------
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/runtest/cve b/runtest/cve
index c2e9e8c89..b9ab49c3b 100644
--- a/runtest/cve
+++ b/runtest/cve
@@ -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
diff --git a/testcases/kernel/pty/pty04.c b/testcases/kernel/pty/pty04.c
index 239d2a870..2b9ff7e45 100644
--- a/testcases/kernel/pty/pty04.c
+++ b/testcases/kernel/pty/pty04.c
@@ -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"},
-- 
2.26.1


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

* [LTP] [PATCH] pty04: Correct struct member sizes and add to CVE runtest file
  2020-05-06 17:04 [LTP] [PATCH] pty04: Correct struct member sizes and add to CVE runtest file Richard Palethorpe
@ 2020-05-06 17:19 ` Petr Vorel
  2020-05-07  7:59   ` Li Wang
  2020-05-07  8:12 ` Petr Vorel
  1 sibling, 1 reply; 6+ messages in thread
From: Petr Vorel @ 2020-05-06 17:19 UTC (permalink / raw)
  To: ltp

Hi Richard,

> 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!
Reviewed-by: Petr Vorel <pvorel@suse.cz>

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

Kind regards,
Petr

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

* [LTP] [PATCH] pty04: Correct struct member sizes and add to CVE runtest file
  2020-05-06 17:19 ` Petr Vorel
@ 2020-05-07  7:59   ` Li Wang
  2020-05-07 14:11     ` Cyril Hrubis
  0 siblings, 1 reply; 6+ messages in thread
From: Li Wang @ 2020-05-07  7:59 UTC (permalink / raw)
  To: ltp

On Thu, May 7, 2020 at 1:19 AM Petr Vorel <pvorel@suse.cz> wrote:

> Hi Richard,
>
> > 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!
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
>
> 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.
>

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


> Kind regards,
> Petr
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
>
>

-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20200507/b415096e/attachment.htm>

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

* [LTP] [PATCH] pty04: Correct struct member sizes and add to CVE runtest file
  2020-05-06 17:04 [LTP] [PATCH] pty04: Correct struct member sizes and add to CVE runtest file Richard Palethorpe
  2020-05-06 17:19 ` Petr Vorel
@ 2020-05-07  8:12 ` Petr Vorel
  1 sibling, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2020-05-07  8:12 UTC (permalink / raw)
  To: ltp

Hi Richard,

...
> +++ b/runtest/cve
> @@ -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

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

* [LTP] [PATCH] pty04: Correct struct member sizes and add to CVE runtest file
  2020-05-07  7:59   ` Li Wang
@ 2020-05-07 14:11     ` Cyril Hrubis
  2020-05-07 14:31       ` Petr Vorel
  0 siblings, 1 reply; 6+ messages in thread
From: Cyril Hrubis @ 2020-05-07 14:11 UTC (permalink / raw)
  To: ltp

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

Agree here, the runtest change should be separated.

-- 
Cyril Hrubis
chrubis@suse.cz

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

* [LTP] [PATCH] pty04: Correct struct member sizes and add to CVE runtest file
  2020-05-07 14:11     ` Cyril Hrubis
@ 2020-05-07 14:31       ` Petr Vorel
  0 siblings, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2020-05-07 14:31 UTC (permalink / raw)
  To: ltp

Hi all,

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

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

end of thread, other threads:[~2020-05-07 14:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-06 17:04 [LTP] [PATCH] pty04: Correct struct member sizes and add to CVE runtest file Richard Palethorpe
2020-05-06 17:19 ` Petr Vorel
2020-05-07  7:59   ` Li Wang
2020-05-07 14:11     ` Cyril Hrubis
2020-05-07 14:31       ` Petr Vorel
2020-05-07  8:12 ` Petr Vorel

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.