Skip to content

Commit 1485c0e

Browse files
st424204Bing-Jhong Billy Jheng
and
Bing-Jhong Billy Jheng
authored
Add kernelCTF CVE-2023-4622_cos (#81)
* Upload CVE-2023-4622_cos * Fix offset issue --------- Co-authored-by: Bing-Jhong Billy Jheng <[email protected]>
1 parent 997724c commit 1485c0e

File tree

12 files changed

+1334
-0
lines changed

12 files changed

+1334
-0
lines changed

pocs/linux/kernelctf/CVE-2023-4622_cos/docs/exploit.md

+465
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
- Requirements:
2+
- Capabilites: NA
3+
- Kernel configuration: CONFIG_UNIX=y
4+
- User namespaces required: No
5+
- Introduced by: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=869e7c62486e
6+
- Fixed by: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.1.y&id=790c2f9d15b594350ae9bca7b236f2b1859de02c
7+
- Affected Version: v4.2 - v6.4
8+
- Affected Component: af_unix
9+
- Syscall to disable: splice
10+
- URL: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-4622
11+
- Cause: Use-After-Free
12+
- Description: A use-after-free vulnerability in the Linux kernel's af_unix. unix_stream_sendpage() tries to add data to the last skb in the peer's
13+
recv queue without locking the queue. So, there is a race where unix_stream_sendpage() could access an skb locklessly that is being
14+
released by garbage collection, resulting in use-after-free. We recommend upgrading past commit 790c2f9d15b594350ae9bca7b236f2b1859de02c.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
exploit: poc root run.sh
2+
tar czf ./poc.tar.gz poc root
3+
cp run.sh exploit
4+
fallocate -l 512 exploit
5+
dd if=poc.tar.gz of=exploit conv=notrunc oflag=append
6+
7+
poc: poc.c
8+
gcc -o poc poc.c -static -pthread
9+
root: root.c
10+
gcc -o root root.c -static
11+
clean:
12+
rm -rf poc root exploit poc.tar.gz
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)