惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
Visual Studio Blog
IT之家
IT之家
博客园 - 聂微东
The Cloudflare Blog
月光博客
月光博客
阮一峰的网络日志
阮一峰的网络日志
S
SegmentFault 最新的问题
Apple Machine Learning Research
Apple Machine Learning Research
酷 壳 – CoolShell
酷 壳 – CoolShell
爱范儿
爱范儿
H
Help Net Security
博客园 - 叶小钗
V
V2EX
WordPress大学
WordPress大学
J
Java Code Geeks
Hugging Face - Blog
Hugging Face - Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园_首页
C
Check Point Blog
B
Blog
D
DataBreaches.Net
美团技术团队
罗磊的独立博客

Entropic

Inspect: Read the Bits :: Entropic NETGEAR EXS27 NGR LAN-side Pre-auth Command Injection in llmnrd via LLMNR Query Name :: Entropic ANSI Ink for Philes :: Entropic NETGEAR EXS27 NGR Pre-auth Administrator Takeover Chained to Root SSH Shell via Configuration Restore :: Entropic NETGEAR EXS27 NGR Pre-auth debug.cgi Archive Sensitive Information Disclosure :: Entropic Let's Decrypt NETGEAR EXS27 NGR Firmware V1.0.1.34! :: Entropic NETGEAR EXS27 NGR Local-LAN/L2 Pre-auth Command Injection in Root-started devProbe via DHCP Option 12 Hostname :: Entropic CVE-2016-9297: LibTIFF :: Entropic CVE-2017-13028: TCPdump :: Entropic Fuzz two legacy CVEs in libexif :: Entropic CVE-2019-13288: Xpdf :: Entropic The Fuzzy Notebook :: Entropic Write-ups: Pwnable.tw :: Entropic Write-ups: System Security (Microarchitecture Exploitation) series :: Entropic Intel Control-flow Enforcement Technology Bypass :: Entropic Write-ups: 0xL4ugh CTF v5 :: Entropic 此地不宜调试 :: Entropic 梅花易数札记 :: Entropic Write-ups: ARM Architecture (ARM64 ROP) series :: Entropic The Cross-ISAs Notebook :: Entropic 2025 年终总结 :: Entropic Write-ups: System Security (Kernel Security) series (Completed) :: Entropic Write-ups: BlackHat MEA CTF Final 2025 :: Entropic Write-ups: Software Exploitation (Exploitation Primitives) series (Completed) :: Entropic Sapido RB-1732 路由器 RCE 漏洞 :: Entropic Write-ups: Software Exploitation (File Struct Exploits) series (Completed) :: Entropic Write-ups: 第八届「强网」拟态防御国际精英挑战赛-线上预选赛 :: Entropic Write-ups: 第九届「强网杯」全国网络安全挑战赛 :: Entropic Write-ups: Software Exploitation (Dynamic Allocator Exploitation) series (Completed) :: Entropic Write-ups: 2025 年「羊城杯」网络安全大赛初赛 [本科院校组] :: Entropic
CVE-2017-9048: libxml2 :: Entropic
CuB3y0nd · 2026-03-09 · via Entropic
# CVE-2017-9048

## Description

CVE: https://www.cve.org/CVERecord?id=CVE-2017-9048

# Compile

## Download

```shellsession
git clone https://github.com/GNOME/libxml2.git && cd libxml2
git checkout v2.9.4
```

## Build

 `valid.c`  `xmlSnprintfElementContent` 
西 fuzzing 

```shellsession
./autogen.sh
AFL_USE_ASAN=1 
CC=afl-clang-lto 
CXX=afl-clang-lto++ 
./configure 
  --prefix="$(realpath ../libxml2-fuzz-asan)" 
  --disable-shared 
  --without-debug 
  --without-ftp 
  --without-http 
  --without-legacy 
  --without-python
make clean && 
AFL_USE_ASAN=1 make -j`nproc` && 
AFL_USE_ASAN=1 make install
```

……
 `invalid token at start of a preprocessor expressio
n` `.in`  `@@`  `@WITH_PUS
H @`

使 `grug-far.nvim` `@([^@s]+)s+@` `@$1@` 


……线
 fuzz 
使 `ASAN_OPTIONS=help=1 ../libxml2-fuzz-asan/bin/xml
lint``nm ../libxml2-fuzz-asan/bin/xmllint | rg -i asan`

 ASAN  2x - 10x  ASAN 线
线

 [Notes for using ASAN with afl-fuzz](https://aflplus.plus/docs/no
tes_for_asan/) 



```shellsession
CC=afl-clang-lto 
CXX=afl-clang-lto++ 
./configure 
  --prefix="$(realpath ../libxml2-fuzz-lite)" 
  --disable-shared 
  --without-debug 
  --without-ftp 
  --without-http 
  --without-legacy 
  --without-python
make clean && 
make -j`nproc` && 
make install
```

# Samples

 xml tag,  fuzzer 
AFL++ 
 corpus, libxml2  test  `<!DOCTYPE
 a []>`  `<a b="c">d</a>`

# Fuzzing

`xmllint` 便
线 fuzz 便

```bash
#!/bin/bash

MASTER_BIN="../libxml2-fuzz-asan/bin/xmllint"
SLAVE_BIN="../libxml2-fuzz-lite/bin/xmllint"
INPUT_CORPUS="corpus"
OUTPUT_DIR="outs"
SHM_BASE="/dev/shm/fuzz"

# Arguments for the Master instance
MASTER_ARGS="--debug --valid"

# Argument pool for Slave instances
SLAVE_ARGS_POOL=(
  "--memory --oldxml10"
  "--postvalid"
)

# --- Dictionary Support ---
DICT_PATH="./dict/xml.dict"
DICT_OPT=""
if [ -d "$DICT_PATH" ] || [ -f "$DICT_PATH" ]; then
  DICT_OPT="-x $DICT_PATH"
fi

# --- Environment Check ---
if [ ! -f "$MASTER_BIN" ] || [ ! -f "$SLAVE_BIN" ]; then
  echo "[-] Error: Fuzzing binaries not found. Check your paths."
  exit 1
fi

TOTAL_THREADS=${1:-4}
if [ "$TOTAL_THREADS" -lt 1 ]; then
  echo "Usage: $0 [total_threads]"
  exit 1
fi

# --- Resume Logic ---
if [ -d "$OUTPUT_DIR/master" ]; then
  echo "[*] Existing output detected. Resuming fuzzing session..."
  INPUT_OPT="-i -"
else
  echo "[*] First run. Using input corpus: $INPUT_CORPUS"
  mkdir -p "$OUTPUT_DIR"
  INPUT_OPT="-i $INPUT_CORPUS"
fi

mkdir -p "$SHM_BASE"

# --- Launch Master (ASAN) ---
echo "[+] Launching Master (ASAN) | Args: $MASTER_ARGS @@"
mkdir -p "$SHM_BASE/master"
AFL_TMPDIR="$SHM_BASE/master" 
  afl-fuzz $INPUT_OPT 
  -o "$OUTPUT_DIR" 
  -m none 
  $DICT_OPT 
  -M master 
  -- "$MASTER_BIN" $MASTER_ARGS @@ >"$OUTPUT_DIR/master.log" 2>&1 &

# Brief sleep to let Master initialize
sleep 2

# --- Launch Slaves (Non-ASAN) ---
NUM_VARIANTS=${#SLAVE_ARGS_POOL[@]}

for i in $(seq 1 $((TOTAL_THREADS - 1))); do
  SLAVE_NAME="slave_$i"
  ARG_INDEX=$(((i - 1) % NUM_VARIANTS))
  CURRENT_ARGS=${SLAVE_ARGS_POOL[$ARG_INDEX]}

  echo "[+] Launching $SLAVE_NAME | Args: $CURRENT_ARGS @@"
  mkdir -p "$SHM_BASE/$SLAVE_NAME"

  AFL_TMPDIR="$SHM_BASE/$SLAVE_NAME" 
    afl-fuzz $INPUT_OPT 
    -o "$OUTPUT_DIR" 
    -m none 
    $DICT_OPT 
    -S "$SLAVE_NAME" 
    -- "$SLAVE_BIN" $CURRENT_ARGS @@ >/dev/null 2>&1 &
done

echo "------------------------------------------------------"
echo "[!] Successfully started $TOTAL_THREADS instances with @@ input mode."
echo "[!] Check status: afl-whatsup $OUTPUT_DIR"
echo "[!] Stop all:     pkill afl-fuzz"
echo "------------------------------------------------------"
```

线 fuzz,  chall  crashes
 

~ crashes ~
 ASAN  _uwu_