Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add kernelCTF CVE-2023-4622_lts #74

Merged
merged 21 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
465 changes: 465 additions & 0 deletions pocs/linux/kernelctf/CVE-2023-4622_lts/docs/exploit.md

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions pocs/linux/kernelctf/CVE-2023-4622_lts/docs/vulnerability.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
- Requirements:
- Capabilites: NA
- Kernel configuration: CONFIG_UNIX=y
- User namespaces required: No
- Introduced by: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=869e7c62486e
- Fixed by: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.1.y&id=790c2f9d15b594350ae9bca7b236f2b1859de02c
- Affected Version: v4.2 - v6.4
- Affected Component: af_unix
- Syscall to disable: splice
- URL: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-4622
- Cause: Use-After-Free
- 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
recv queue without locking the queue. So, there is a race where unix_stream_sendpage() could access an skb locklessly that is being
released by garbage collection, resulting in use-after-free. We recommend upgrading past commit 790c2f9d15b594350ae9bca7b236f2b1859de02c.
12 changes: 12 additions & 0 deletions pocs/linux/kernelctf/CVE-2023-4622_lts/exploit/lts-6.1.36/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
exploit: poc root run.sh
tar czf ./poc.tar.gz poc root
cp run.sh exploit
fallocate -l 512 exploit
dd if=poc.tar.gz of=exploit conv=notrunc oflag=append

poc: poc.c
gcc -o poc poc.c -static -pthread
root: root.c
gcc -o root root.c -static
clean:
rm -rf poc root exploit poc.tar.gz
Binary file not shown.
Binary file not shown.
Loading
Loading