#!/bin/sh
# DF-1045 PoC build script
# The SCSI target driver (scsi_target.c) is 'optional targ' and is NOT
# compiled into the default X86_64_GENERIC kernel. This PoC builds the
# userspace trigger that would exercise the targclose UAF *if* the targ
# driver were present AND a target-capable SCSI HBA existed.
set -e
cd "$(dirname "$0")"
echo "[build] cc -o tgt_uaf tgt_uaf.c"
cc -o tgt_uaf tgt_uaf.c
echo "[build] OK: tgt_uaf"
ls -l tgt_uaf
