Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
be0ecfa
Add kernelCTF CVE-2025-38617_mitigation_cos
quanggle97 Feb 25, 2026
2ca48fb
Update exploit.c
quanggle97 Feb 25, 2026
39a2c06
Update exploit.c
quanggle97 Feb 25, 2026
a1e716d
Update exploit.md
quanggle97 Feb 26, 2026
fb86478
Update exploit.c
quanggle97 Feb 28, 2026
2b06b5a
Update exploit.c
quanggle97 Feb 28, 2026
c9da30d
Update exploit.md
quanggle97 Feb 28, 2026
95ed168
Update exploit.c
quanggle97 Feb 28, 2026
6d34363
Update exploit.c
quanggle97 Feb 28, 2026
5c47321
Update exploit.c
quanggle97 Feb 28, 2026
3772ee5
Update exploit.c
quanggle97 Feb 28, 2026
3521137
Update exploit.c
quanggle97 Feb 28, 2026
c7b43ce
Update exploit.c
quanggle97 Feb 28, 2026
1677f9f
Update exploit.c
quanggle97 Feb 28, 2026
b63016d
Update exploit.c
quanggle97 Feb 28, 2026
60da077
Update exploit.c
quanggle97 Feb 28, 2026
7c988b3
Update exploit.c
quanggle97 Feb 28, 2026
f8ffedc
Update exploit.h
quanggle97 Feb 28, 2026
152dd3f
Update exploit.c
quanggle97 Feb 28, 2026
4444b69
Update exploit.c
quanggle97 Feb 28, 2026
aaa58a1
Update exploit.c
quanggle97 Feb 28, 2026
7d80c19
Update exploit.md
quanggle97 Feb 28, 2026
8f37de8
Update exploit.c
quanggle97 Feb 28, 2026
f39792b
Update exploit.c
quanggle97 Feb 28, 2026
1d44cba
Update exploit.c
quanggle97 Mar 1, 2026
6be41d3
Update exploit.c
quanggle97 Mar 1, 2026
cb34bd7
Update exploit.c
quanggle97 Mar 1, 2026
18326ee
Update exploit.c
quanggle97 Mar 1, 2026
e891259
Update exploit.c
quanggle97 Mar 1, 2026
d025b8a
Update exploit.c
quanggle97 Mar 1, 2026
9d593f5
Update exploit.c
quanggle97 Mar 1, 2026
2cde2f7
Update exploit.c
quanggle97 Mar 1, 2026
a58b2a5
Update exploit.c
quanggle97 Mar 1, 2026
b5696f2
Update exploit.c
quanggle97 Mar 1, 2026
2766b62
Update metadata.json
quanggle97 Mar 10, 2026
0d2abc6
Update metadata.json
quanggle97 Mar 10, 2026
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
1,646 changes: 1,646 additions & 0 deletions pocs/linux/kernelctf/CVE-2025-38617_mitigation_cos/docs/exploit.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Vulnerability

A race between packet_set_ring() and packet_notifier() allow the packet socket to hook to network interface and receive packet sent to that network interface while the ring buffer is configured. The received packet might found the old ring buffer that already be freed.

## Requirements to trigger the vulnerability:
- Capabilities: To trigger the vulnerability, `CAP_NET_RAW` capabilities are required.
- Kernel configuration: `CONFIG_PACKET` is required to trigger this vulnerability.
- Are user namespaces needed?: Yes. As this vulnerability requires `CAP_NET_RAW`, which are not usually given to the normal user, we used the unprivileged user namespace to achieve this capability.

## Commit which introduced the vulnerability
- This vulnerability was introduced in Linux-2.6.12-rc2, with commit [ce06b03e60fc1](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ce06b03e60fc1)
- This commit add head drop fifo queue to the kernel.

## Commit which fixed the vulnerability
- This vulnerability was fixed with commit [01d3c8417b9c1b884a8a981a3b886da556512f36](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=01d3c8417b9c1b884a8a981a3b886da556512f36)

## Affected kernel versions
- Linux version 2.6.12 - 6.16 affects to this vulnerability

## Affected component, subsystem
- Packet socket

## Cause (UAF, BoF, race condition, double free, refcount overflow, etc)
- UAF
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# taken from: https://github.com/google/security-research/blob/1bb2f8c8d95a34cafe7861bc890cfba5d85ec141/pocs/linux/kernelctf/CVE-2024-0193_lts/exploit/lts-6.1.67/Makefile

LIBMNL_DIR = $(realpath ./)/libmnl_build
LIBNFTNL_DIR = $(realpath ./)/libnftnl_build

LIBS = -L$(LIBMNL_DIR)/install/lib -lmnl
INCLUDES = -I$(LIBMNL_DIR)/libmnl-1.0.5/include
CFLAGS = -static -Ofast

exploit: exploit.c
gcc -o exploit exploit.c $(LIBS) $(INCLUDES) $(CFLAGS)


prerequisites: libmnl-build

libmnl-build : libmnl-download
tar -C $(LIBMNL_DIR) -xvf $(LIBMNL_DIR)/libmnl-1.0.5.tar.bz2
cd $(LIBMNL_DIR)/libmnl-1.0.5 && ./configure --enable-static --prefix=`realpath ../install`
cd $(LIBMNL_DIR)/libmnl-1.0.5 && make -j`nproc`
cd $(LIBMNL_DIR)/libmnl-1.0.5 && make install


libmnl-download :
mkdir $(LIBMNL_DIR)
wget -P $(LIBMNL_DIR) https://netfilter.org/projects/libmnl/files/libmnl-1.0.5.tar.bz2

run:
./exploit

clean:
rm -f exploit
rm -rf $(LIBMNL_DIR)
Binary file not shown.
Loading
Loading