Add test for CVE 2022-4378
PATCH 1/1 Add test for CVE 2022-4378
--- runtest/cve | 1 + testcases/cve/.gitignore | 1 + testcases/cve/cve-2022-4378.c | 108 ++++++++++++++++++++++++++++++++++ 3 files changed, 110 insertions(+) create mode 100644 testcases/cve/cve-2022-4378.c
runtest/cve +1 -0
@@ -76,3 +76,4 @@ cve-2022-0847 dirtypipe cve-2022-2590 dirtyc0w_shmem # Tests below may cause kernel memory leak cve-2020-25704 perf_event_open03 +cve-2022-4378 cve-2022-4378
testcases/cve/.gitignore +1 -0
@@ -10,4 +10,5 @@ stack_clash cve-2017-17052 cve-2017-16939 cve-2017-17053 +cve-2022-4378 icmp_rate_limit01
testcases/cve/cve-2022-4378.c new file +108 -0
108 lines not on this page · raw message
Signature · 5 lines
2.39.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hello,
Quoted 40 lines · Martin Doucha
Signed-off-by Martin Doucha <[email protected]>--- runtest/cve | 1 + testcases/cve/.gitignore | 1 + testcases/cve/cve-2022-4378.c | 108 ++++++++++++++++++++++++++++++++++ 3 files changed, 110 insertions(+) create mode 100644 testcases/cve/cve-2022-4378.cruntest/cve +1
-0@@ -76,3 +76,4 @@ cve-2022-0847 dirtypipe cve-2022-2590 dirtyc0w_shmem # Tests below may cause kernel memory leak cve-2020-25704 perf_event_open03 +cve-2022-4378 cve-2022-4378testcases/cve/.gitignore +1
-0@@ -10,4 +10,5 @@ stack_clash cve-2017-17052 cve-2017-16939 cve-2017-17053 +cve-2022-4378 icmp_rate_limit01testcases/cve/cve-2022-4378.c new file +7
-0@@ -0,0 +1,108 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* +* Copyright (C) 2022 SUSE LLC <[email protected]> +*/ + +/*\ +* CVE 2022-4378
testcases/cve/cve-2022-4378.c line 17
Quoted 10 lines
testcases/cve/cve-2022-4378.c new file +10
-0+* +* Check that writing several pages worth of whitespace into /proc/sys files +* does not cause kernel stack overflow. Kernel bug fixed in: +* +* commit bce9332220bd677d83b19d21502776ad555a0e73 +* Author: Linus Torvalds <[email protected]> +* Date: Mon Dec 5 12:09:06 2022 -0800 +* +* proc: proc_skip_spaces() shouldn't think it is working on C strings +*/
Haha, OK, merged with minor fix to null terminate tags array (detected by make check).
Signature · 5 lines
Thank you, Richard. -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Martin,
testcases/cve/cve-2022-4378.c line 6
Quoted 12 lines
testcases/cve/cve-2022-4378.c new file +6
-0@@ -0,0 +1,108 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* +* Copyright (C) 2022 SUSE LLC <[email protected]> +*/ + +/*\
nit: you used /*\ docparse start comment, but without any [...] mark, thus nothing shows in generated docs.
There should have been either normal C comment /* or docparse [...] mark.
Kind regards,
Petr
Quoted 12 lines
testcases/cve/cve-2022-4378.c new file +3
-0+* CVE 2022-4378 +* +* Check that writing several pages worth of whitespace into /proc/sys files
+ * does not cause kernel stack overflow. Kernel bug fixed in:
+ *
+ * commitbce9332220bd677d83b19d21502776ad555a0e73
+ * Author: Linus Torvalds <[email protected]>
+ * Date: Mon Dec 5 12:09:06 2022 -0800
+ *
+ * proc:proc_skip_spaces()shouldn't think it is working on C strings
+ */
...
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 17 lines · pvorel
Hi Martin,
testcases/cve/cve-2022-4378.c line 6
Quoted 12 lines
testcases/cve/cve-2022-4378.c new file +6
-0@@ -0,0 +1,108 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* +* Copyright (C) 2022 SUSE LLC <[email protected]> +*/ + +/*\ nit: you used /*\ docparse start comment, but without any [...] mark, thus nothing shows in generated docs.
There should have been either normal C comment /* or docparse [...] mark.
I'm sorry, I was wrong, the text *appear* in generated docs, just without any header. Just the text contains too much details (given we have link to git commit in the table below):
... fixed in:
commit bce9332220bd677d83b19d21502776ad555a0e73 Author: Linus Torvalds <[email protected]> Date: Mon Dec 5 12:09:06 2022 -0800
Kind regards,
Petr
Quoted 18 lines
Kind regards,
PetrQuoted 13 lines
testcases/cve/cve-2022-4378.c new file +3
-0+* CVE 2022-4378 +* +* Check that writing several pages worth of whitespace into
/proc/sysfiles
+ * does not cause kernel stack overflow. Kernel bug fixed in:
+ *
+ * commitbce9332220bd677d83b19d21502776ad555a0e73
+ * Author: Linus Torvalds <[email protected]>
+ * Date: Mon Dec 5 12:09:06 2022 -0800
+ *
+ * proc:proc_skip_spaces()shouldn't think it is working on C strings
+ */...
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hello,
Quoted 21 lines · pvorel
Quoted 11 lines · pvorel
Hi Martin,
Quoted 9 lines
testcases/cve/cve-2022-4378.c new file +2
-0@@ -0,0 +1,108 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* Quoted 8 lines
testcases/cve/cve-2022-4378.c line 6
Quoted 4 lines
testcases/cve/cve-2022-4378.c new file +4
-0+* Copyright (C) 2022 SUSE LLC <[email protected]> +*/ + +/*\ nit: you used /*\ docparse start comment, but without any [...] mark, thus nothing shows in generated docs.
There should have been either normal C comment /* or docparse [...] mark.
Quoted 2 lines
I'm sorry, I was wrong, the text *appear* in generated docs, just without any header.
Perhaps make-check could validate the docparse string?
Quoted 7 lines
Just the text contains too much details (given we have link to git commit in the table below):
... fixed in:
commit
bce9332220bd677d83b19d21502776ad555a0e73Author: Linus Torvalds <[email protected]> Date: Mon Dec 5 12:09:06 2022 -0800
I think it is fine to even copy and paste the whole commit message. If we list the wrong Git commit this may make it easier to see as well.
Quoted 21 lines
Kind regards,
PetrQuoted 17 lines
Kind regards,
PetrQuoted 13 lines
testcases/cve/cve-2022-4378.c new file +3
-0+* CVE 2022-4378 +* +* Check that writing several pages worth of whitespace into
/proc/sysfiles
+ * does not cause kernel stack overflow. Kernel bug fixed in:
+ *
+ * commitbce9332220bd677d83b19d21502776ad555a0e73
+ * Author: Linus Torvalds <[email protected]>
+ * Date: Mon Dec 5 12:09:06 2022 -0800
+ *
+ * proc:proc_skip_spaces()shouldn't think it is working on C strings
+ */...
Signature · 5 lines
Thank you, Richard. -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Richie,
Quoted 25 lines
Hello,
Quoted 20 lines · pvorel
Quoted 19 lines · pvorel
Hi Martin,
testcases/cve/cve-2022-4378.c line 6
Quoted 13 lines
testcases/cve/cve-2022-4378.c new file +6
-0@@ -0,0 +1,108 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* +* Copyright (C) 2022 SUSE LLC <[email protected]> +*/ + +/*\ nit: you used /*\ docparse start comment, but without any [...] mark, thus nothing shows in generated docs.
There should have been either normal C comment /* or docparse [...] mark.
Quoted 4 lines
Quoted 2 lines
I'm sorry, I was wrong, the text *appear* in generated docs, just without any header.
Perhaps make-check could validate the docparse string?
+1, I was already thinking about it.
It would not help in the case below, but it's definitely worth (error in JSON will be caught by CI, but why not to catch it early?)
Quoted 10 lines
Quoted 7 lines
Just the text contains too much details (given we have link to git commit in the table below):
... fixed in:
commit
bce9332220bd677d83b19d21502776ad555a0e73Author: Linus Torvalds <[email protected]> Date: Mon Dec 5 12:09:06 2022 -0800I think it is fine to even copy and paste the whole commit message. If we list the wrong Git commit this may make it easier to see as well.
I'd just use the format for "Fixes:":
$ git log --pretty=format:"%h (\"%s\")" -1
bce9332220bd ("proc: proc_skip_spaces() shouldn't think it is working on C strings")Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp