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-2024-50264_lts_cos #145

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
84b2d7a
feat: CVE-2024-50264_lts_cos init
qwerty-theori Dec 16, 2024
38c3f4b
fix: remove CLONE_NEWUSER for pass Reduced attack surface
qwerty-theori Dec 16, 2024
9493b9a
feat: update metadata
qwerty-theori Dec 16, 2024
e3fd551
feat: add prerequisites
qwerty-theori Dec 16, 2024
27cd8ec
feat: add exploit.md
qwerty-theori Dec 16, 2024
01fb012
feat: add vuln.md
qwerty-theori Dec 16, 2024
c649018
fix: wrong lts name
qwerty-theori Dec 16, 2024
700b9d5
fix: wrong folder fix & change lts name
qwerty-theori Dec 16, 2024
895ba53
fix: change lts folder name
qwerty-theori Dec 16, 2024
8184668
fix: disable new net also
qwerty-theori Dec 16, 2024
bf1a9de
fix: idk why open fail
qwerty-theori Dec 16, 2024
f6e7503
fix: change to available rlimit
qwerty-theori Dec 16, 2024
c5d5365
fix: change to available rlimit for cos
qwerty-theori Dec 16, 2024
b71167e
fix: change cos timerfd timing
qwerty-theori Dec 16, 2024
b445f32
fix: change cos timerfd timing
qwerty-theori Dec 16, 2024
3d5db10
test: cos trigger test by using lts
qwerty-theori Dec 16, 2024
427c578
test: revoke test code
qwerty-theori Dec 16, 2024
68994ab
fix: change cos timerfd timing
qwerty-theori Dec 16, 2024
a8f152f
fix: change cos timerfd timing, verified at kernelctf server
qwerty-theori Dec 16, 2024
09335ab
fix: change cos timerfd timing, verified at kernelctf server & flag
qwerty-theori Dec 16, 2024
aa7cc3d
fix: typos in exploit.md
V4bel-theori Dec 17, 2024
77356e2
fix: typos in exploit.md
V4bel-theori Dec 18, 2024
0590d53
fix: set sigalarm for escape hanging
qwerty-theori Dec 16, 2024
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
694 changes: 694 additions & 0 deletions pocs/linux/kernelctf/CVE-2024-50264_lts_cos/docs/exploit.md

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions pocs/linux/kernelctf/CVE-2024-50264_lts_cos/docs/vulnerability.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
- Requirements:
- Capabilites: None
- Kernel configuration: CONFIG_VSOCKETS, CONFIG_VSOCKETS_LOOPBACK
- User namespaces required: No
- Introduced by: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/net/vmw_vsock?id=06a8fc78367d070720af960dcecec917d3ae5f3b
- Fixed by: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/net/vmw_vsock?id=6ca575374dd9a507cdd16dfa0e78c2e9e20bd05f
- Affected kernel versions: v4.8-rc1 - v6.12-rc7
- Affected component: vsock
- Syscall to disable: socket
- URL: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-50264
- Cause: Use-After-Free
- Description: During vsock loopback communication, a dangling pointer can be created in vsk->trans. In a complex race condition scenario, this dangling pointer can be dereferenced, leading to a Use-After-Free condition.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# define complier type
CC = gcc
# compile options setting
CFLAGS = -O2 -static -w
# library link & option setting
LDFLAGS = -lkeyutils

SUBDIRS = modules

prerequisites:
sudo apt-get install libkeyutils-dev

clean_subdirs:
@for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir clean; \
done

exploit: exploit.c modules/helper.o modules/pipe.o modules/xattr.o modules/msg_msg.o modules/keyring.o
$(CC) $(CFLAGS) $^ -o $@ $(LIBS) $(INCLUDES) $(LDFLAGS)

all:
$(MAKE) exploit

clean:
$(MAKE) clean_subdirs
rm -f *.o exploit
Binary file not shown.
Loading
Loading