Exploit database

GH-7d1759469adaacd6cb6ef41c6fb3d109

repobor/ghostlock-cve-2026-43499-4.19-thyme

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-43499

165 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files3

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

lkm/kdiag/build.sh

Shell · 1,821 bytes
#!/usr/bin/env bash
# Build kdiag.ko against the device's own kheaders.
# Usage: ./build.sh [path-to-kheaders]
set -euo pipefail

HERE=$(cd "$(dirname "$0")" && pwd)
ROOT=$(cd "$HERE/../.." && pwd)
KH=${1:-"$ROOT/.tmp/ko-inspect/kheaders"}
NDK=${NDK:-/e/Android/sdk/ndk/23.0.7599858}
CLANG="$NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe"
LLD="$NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/ld.lld.exe"
OBJCOPY="$NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-objcopy.exe"
RESINC="$($CLANG -print-resource-dir)/include"
KH_W=$(cygpath -w "$KH" 2>/dev/null || echo "$KH")

test -f "$KH/include/generated/autoconf.h" || {
	echo "kheaders not found at $KH" >&2
	exit 1
}

INCS=(
	"-I$KH_W/arch/arm64/include"
	"-I$KH_W/arch/arm64/include/generated"
	"-I$KH_W/include"
	"-I$KH_W/include/generated"
	"-I$KH_W/arch/arm64/include/uapi"
	"-I$KH_W/include/uapi"
	"-I$KH_W/arch/arm64/include/generated/uapi"
	"-I$KH_W/include/generated/uapi"
)

CFLAGS=(
	--target=aarch64-linux-gnu
	-nostdinc
	"-isystem$RESINC"
	-D__KERNEL__
	-DMODULE
	-DKBUILD_MODNAME='"kdiag"'
	"-include$KH_W/include/linux/kconfig.h"
	"-include$KH_W/include/generated/autoconf.h"
	"${INCS[@]}"
	-O2
	-fno-strict-aliasing
	-fno-common
	-fno-builtin
	-fno-stack-protector
	-fno-pic
	-fno-PIE
	-fno-asynchronous-unwind-tables
	-fno-unwind-tables
	-fno-delete-null-pointer-checks
	-mgeneral-regs-only
	-mno-outline-atomics
	-Wno-unused-value
	-Wno-unused-variable
	-Wno-unused-function
	-Wno-address-of-packed-member
	-Wno-unknown-warning-option
)

cd "$HERE"
rm -f kdiag.o kdiag.ko
"$CLANG" "${CFLAGS[@]}" -c kdiag.c -o kdiag.o
"$LLD" -r -o kdiag.ko kdiag.o
"$OBJCOPY" --strip-debug kdiag.ko kdiag.ko.stripped
mv kdiag.ko.stripped kdiag.ko

readelf -S kdiag.ko | grep -E "this_module|modinfo|versions|text" || true
echo "built $HERE/kdiag.ko"