目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2025-39913 PoC — Linux kernel 安全漏洞

来源
关联漏洞
标题: Linux kernel 安全漏洞 (CVE-2025-39913)
Description:Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于tcp_bpf_send_verdict分配psock->cork失败时未调用sk_msg_free,可能导致内存泄漏。
Description
UAF in linux kernel >= 6.1.152 (psock->cork) 
介绍
# CVE-2025-39913  - Linux Kernel eBPF SOCKMAP (UAF)
**Author: Byte Reaper**

**My platform : https://www.bytrep.com/**
## Description
- This repository contains a technical proof-of-concept for CVE-2025-39913, a vulnerability in the Linux kernel's tcp_bpf_send_verdict() function. When bpf_msg_cork_bytes() fails to allocate psock->cork, the kernel may skip freeing sk_msg, leading to memory mismanagement. This can result in memory leaks or potential use-after-free (UAF) conditions under specific eBPF sk_msg operations.

Affects Linux kernel versions ≤ 6.12.38 with SOCKMAP support.


## Requirements :
```
Kernel ≤ 6.12.38
Linux x86_64
GCC
```

## Build :
```
	1 - Create Makefile : 

        # touch Makefile

    2 - Paste the content into the Makfile :  

        TARGET := CVE-2025-39913

        KERNEL_PATH := /usr/src/linux-headers-$(shell uname -r)

        BPF_OBJ := bpf_injection.o

        USER_SRCS := main.c load_bpf.c check_bpfELf.c pingCheck.c com_c.c exit_asm.c sockmap_link.c check_elf.c result.c argparse.c

        USER_OBJS := $(USER_SRCS:.c=.o)
        ALL_OBJS := $(USER_OBJS) $(BPF_OBJ)

        LIBS := -l:libbpf.a -lrt -lelf -lz 

        $(TARGET): $(ALL_OBJS)
            gcc $(USER_OBJS) -o $@ $(LIBS) 
        %.o: %.c
            gcc -c $< -o $@

        $(BPF_OBJ): bpf_injection.c
            clang -O2 -target bpf -c $< -o $@ \
                -nostdinc \
                -I/usr/lib/clang/19/include \
                -I$(KERNEL_PATH)/arch/x86/include \
                -I$(KERNEL_PATH)/arch/x86/include/generated \
                -I$(KERNEL_PATH)/include \
                -I$(KERNEL_PATH)/include/uapi \
                -I$(KERNEL_PATH)/include/generated/uapi \
                -I$(KERNEL_PATH)/include/asm-generic \
                -I/usr/include

        clean:
```
## Run :
```
	 1 - IP address :
     # ./CVE-2025-39913 -i [server-ip] 

    2 - target port (default : 80) :
     # ./CVE-2025-39913 -i [server-ip] -p [PORT]

    3 - Full ARG : 
     # ./CVE-2025-39913 -h

    4 - Check Obj file BPF :
     # ./CVE-2025-39913 -i [server-ip] -p [PORT] -o 

    5 - Check debug tracing : 
     # ./CVE-2025-39913 -i [server-ip] -p [PORT] -c
```

## References

- **Linux BPF TCP** – <https://docs.kernel.org/networking/filter.html>
- **bpf.h** – <https://codebrowser.dev/linux/include/linux/bpf.h.html>
- **NVD (CVE-2025-39913)** – <https://nvd.nist.gov/vuln/detail/CVE-2025-39913>
- **Create SOCKMAP** – <https://docs.kernel.org/bpf/map_sockmap.html>
- **POC** – <https://bytrep.com/exploit39913.html>
## Observation : 
- This is an exploitation taken from the platform https://bytrep.com/

## License : 

MIT



文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →