Exploit databaseDownload repository ZIP
GH-fc6d43932fa19922fde95ccd082d7ac5
devrodt2/cve-2026-28609-matroska-pcm-oob
Sources for CVE-2026-28609
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files6
devrodt2/cve-2026-28609-matroska-pcm-oobRevision a2d841538ddc
- ↑..Parent directory
- build.conf
- build_foundation.sh
- build_harness.sh
- build_plugin.sh
- include_dirs.conf.sample
- run.sh
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
scripts/build_harness.sh
Shell · 3,006 bytes#!/usr/bin/env bash
#
# build_harness.sh - Build the C-ABI trigger harness.
#
# Compiles harness/harness_c_abi.cpp into a PIE executable that loads
# the ASan-instrumented plugin at runtime via dlopen, drives the
# extractor through its C ABI, and reads frames from a WebM file.
#
# The harness statically links libc++ and shares the ASan runtime with
# the plugin via -shared-libsan. Both binaries depend on the same
# libclang_rt.asan-aarch64-android.so, which run.sh pushes to the
# device.
#
# Configuration is read from:
# scripts/build.conf
# scripts/include_dirs.conf
#
# Output:
# plugin-asan/harness_c_abi
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
CONFIG="$SCRIPT_DIR/include_dirs.conf"
BUILD_CONF="$SCRIPT_DIR/build.conf"
BUILD="$ROOT/plugin-asan"
SRC="$ROOT/harness/harness_c_abi.cpp"
[[ -f "$BUILD_CONF" ]] || { echo "[!] missing $BUILD_CONF" >&2; exit 1; }
# shellcheck disable=SC1090
source "$BUILD_CONF"
: "${ANDROID_API:=34}"
: "${ENABLE_ASAN:=1}"
: "${OPT_FLAGS:=-O1 -g -fno-omit-frame-pointer}"
: "${DISABLE_RTTI:=1}"
: "${DISABLE_EXCEPTIONS:=1}"
if [[ -z "${ANDROID_NDK_HOME:-}" ]]; then
echo "[!] ANDROID_NDK_HOME is not set" >&2
exit 1
fi
NDK_BIN="$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin"
CC="$NDK_BIN/aarch64-linux-android${ANDROID_API}-clang++"
fail() { echo "[!] $1" >&2; exit 1; }
[[ -x "$CC" ]] || fail "compiler wrapper not found: $CC"
[[ -f "$SRC" ]] || fail "missing $SRC"
[[ -f "$CONFIG" ]] || fail "missing $CONFIG"
# ---------------------------------------------------------------------------
# Include paths
# ---------------------------------------------------------------------------
INCLUDE_FLAGS=()
while IFS= read -r raw; do
line="$(printf '%s' "$raw" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')"
[[ -z "$line" ]] && continue
[[ "$line" =~ ^# ]] && continue
line="${line//\$ROOT/$ROOT}"
[[ -d "$line" ]] && INCLUDE_FLAGS+=("-I$line")
done < "$CONFIG"
# ---------------------------------------------------------------------------
# Compile and link
# ---------------------------------------------------------------------------
mkdir -p "$BUILD"
cd "$BUILD"
echo "[*] ANDROID_API = $ANDROID_API"
echo "[*] Compiler = $CC"
echo "[*] Building harness_c_abi from $SRC"
echo
CFLAGS=(
-std=c++20
-fPIE
-pie
-Wall
-Wno-macro-redefined
-DANDROID
-static-libstdc++
)
[[ "$ENABLE_ASAN" == "1" ]] && CFLAGS+=(-fsanitize=address -shared-libsan)
[[ "$DISABLE_RTTI" == "1" ]] && CFLAGS+=(-fno-rtti)
[[ "$DISABLE_EXCEPTIONS" == "1" ]] && CFLAGS+=(-fno-exceptions)
# shellcheck disable=SC2206
CFLAGS+=($OPT_FLAGS)
"$CC" "${CFLAGS[@]}" \
"${INCLUDE_FLAGS[@]}" \
-Wl,-rpath,/data/local/tmp \
-Wl,-rpath,/system/lib64 \
-o harness_c_abi "$SRC" \
-ldl -llog \
|| fail "harness build failed"
echo
echo "[+] Build complete: $BUILD/harness_c_abi"
ls -la harness_c_abi