Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2022-32250 PoC — Linux kernel 资源管理错误漏洞

Source
Associated Vulnerability
Title:Linux kernel 资源管理错误漏洞 (CVE-2022-32250)
Description:Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel 5.18.1版本及之前版本存在安全漏洞,该漏洞源于net/netfilter/nf_tables_api.c允许本地用户将权限升级为root用户,攻击者利用该漏洞可导致释放后重用。
Description
LPE PoC of a user-after-free vulnerability in the Linux netfilter subsystem.
Readme
# CVE-2022-32250-LPE
LPE exploit for CVE-2022-32250 - a Use-After-Free vulnerability in netfilter.

My write-up of the vulnerability: [Conquering a Use-After-Free in nf_tables: Detailed Analysis and Exploitation of CVE-2022-32250](https://ysanatomic.github.io/cve-2022-32250/) 

## Building
Building requires `libmnl` and `libnftnl`.
```
gcc -lmnl -lnftnl exploit.c -o exploit
```

## Reliability
The vulnerability impacts both versions that have only `KMALLOC_NORMAL` caches and those that also have `KMALLOC_CGROUP`. When making the exploit I only used primitives that would work in both cases - however, testing was conducted on `5.12` which has just `KMALLOC_NORMAL` caches. In theory it works in both cases - in practice, it might take a little bit of work. 

The reliability of the exploit is reasonable - bottlenecked by the key limit in Linux which limits our object spraying capabilities (the limit is 200 for non-root users).

The exploit is a **Proof-of-Concept** and is able to achieve local privilege escalation on `5.12.0`. It was not my goal to weaponize it so I cannot at all speak about its reliance on any other version.

## Disclaimer
The **Proof-of-Concept** and the write-up of the vulnerability are for educational and research purposes only. Use at your own risk.
File Snapshot

[4.0K] /data/pocs/0113f4228d1f2cca4f5188e82365c06171575635 ├── [ 21K] exploit.c ├── [1.3K] README.md └── [ 43K] writeup.md 0 directories, 3 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. If the original source is unavailable, please email f.jinxu#gmail.com for a local snapshot (replace # with @).
    3. Shenlong has snapshotted the POC code for you. To support long-term maintenance, please consider donating. Thank you for your support.