#!/bin/sh
# DF-0710 run: deterministic code-level reproduction.
#
# The vulnerable kernel routine sco_input() is unreachable live on this guest
# (no options BLUETOOTH in X86_64_GENERIC, netbt.ko not loaded, no Bluetooth
# controller). This harness replicates the exact in-kernel primitives and
# proves the while-vs-if infinite-loop defect deterministically, plus that the
# if-drop fix eliminates it. See VERDICT.md for the full source trace.
cd "$(dirname "$0")"

echo "===== code-level logic harness (deterministic reproduction) ====="
./sco_input_logic
rc=$?
echo "logic harness exit=$rc (0 = bug demonstrated)"

echo
echo "===== live PoC attempt (expected: socket: Protocol not supported) ====="
./sco_input_hang 0 12 2>&1 || true
echo "(live path is unreachable on this guest: no Bluetooth controller + netbt not in default kernel)"
