Skip to contentSkip to conversation

Add test for CVE 2021-22600

PATCH In review Martin Doucha 2 participants 2 messages Feb 17, 2022 – Feb 22, 2022

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Add test for CVE 2021-22600

Fixes #917

---

Changes since v1: Added missing SAFE_CLOSE() at the end of test run.

On a vulnerable system, the test will get stuck in the last setsockopt() call and become unkillable. Reproducer works reliably on affected SLE kernels.

 runtest/syscalls                              |   1 +
 .../kernel/syscalls/setsockopt/.gitignore     |   1 +
 .../kernel/syscalls/setsockopt/setsockopt09.c | 112 ++++++++++++++++++
 3 files changed, 114 insertions(+)
 create mode 100644 testcases/kernel/syscalls/setsockopt/setsockopt09.c
runtest/syscalls +1 -0
index ce6f89f88..6c88454cc 100644
@@ -1391,6 +1391,7 @@ setsockopt05 setsockopt05
 setsockopt06 setsockopt06
 setsockopt07 setsockopt07
 setsockopt08 setsockopt08
+setsockopt09 setsockopt09
 
 settimeofday01 settimeofday01
 settimeofday02 settimeofday02
testcases/kernel/syscalls/setsockopt/.gitignore +1 -0
index 95a5e43f8..fd3235bb3 100644
@@ -6,3 +6,4 @@
 /setsockopt06
 /setsockopt07
 /setsockopt08
+/setsockopt09
testcases/kernel/syscalls/setsockopt/setsockopt09.c new file +112 -0

112 lines not on this page · raw message

Signature · 5 lines
2.34.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#1 lore raw

Hi!
Pushed with two minor changes, thanks.

* Reformatted the description comment so that it's picked up by docparser

* Added a runtest entry to the cve runtest file as well

Signature · 5 lines
Cyril Hrubis
[email protected]

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