Igneum Miner jobs: every helper by absolute path through platform::tool (R4.3.3: curl, nvidia-smi, wsl, tar, powershell, taskkill, bash, nohup)

The job runner launched its helpers by bare name; binary planting into a writable PATH entry fed an elevated
prompt was the round-4 finding. Fetched files were already sha256-checked before use (fetch and shard-benchmark
refuse a job without a 64-hex sha256 at parse time, fetch_file verifies before the rename).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
igneum-labs 2026-10-04 14:00:08 +00:00
parent 456eff08d5
commit d5398f3ed6

View file

@ -577,9 +577,9 @@ fn fetch_jobs(url: &str, dir: &Path) -> Result<jobs::JobsFile, String> {
fn probe(req: &str) -> bool {
match req {
"nvidia" => run_capture(Command::new("nvidia-smi").arg("-L"), Duration::from_secs(20)).0 == Some(0),
"wsl" => cfg!(windows) && run_capture(Command::new("wsl.exe").arg("--status"), Duration::from_secs(30)).0 == Some(0),
"wsl" => cfg!(windows) && run_capture(Command::new(crate::platform::tool("wsl")).arg("--status"), Duration::from_secs(30)).0 == Some(0),
"wsl-prover" => {
cfg!(windows) && run_capture(Command::new("wsl.exe").args(["-d", DEFAULT_DISTRO, "--", "bash", "-lc", "command -v cargo && ls ~/.sp1 && ls ~/igneum-prove"]), Duration::from_secs(90)).0 == Some(0)
cfg!(windows) && run_capture(Command::new(crate::platform::tool("wsl")).args(["-d", DEFAULT_DISTRO, "--", "bash", "-lc", "command -v cargo && ls ~/.sp1 && ls ~/igneum-prove"]), Duration::from_secs(90)).0 == Some(0)
}
_ => false,
}
@ -1018,7 +1018,7 @@ fn run_shard_benchmark(shared: &Arc<Shared>, job: &Job, sink: &Sink, data_root:
let shard = fixtures[0].clone();
let blocks = fixtures[1..].join(" ");
sink.stage(&format!("proving {shard} then {} inside {distro} (cap {cap_min} min)", if blocks.is_empty() { "nothing else".to_string() } else { blocks.clone() }));
let mut cmd = Command::new("wsl.exe");
let mut cmd = Command::new(crate::platform::tool("wsl"));
cmd.args(["-d", &distro]);
if !user.is_empty() {
cmd.args(["-u", &user]);
@ -1029,7 +1029,7 @@ fn run_shard_benchmark(shared: &Arc<Shared>, job: &Job, sink: &Sink, data_root:
let ran = run_streamed(&mut cmd, sink, ctl, remaining, shared, job, started, "shard benchmark running")?;
if ran.code.is_none() {
// the Linux side outlives wsl.exe: end the prover there too
let _ = run_capture(Command::new("wsl.exe").args(["-d", &distro, "--", "bash", "-c", "pkill -f igneum-prove-host; pkill -f prove-shard.sh; true"]), Duration::from_secs(30));
let _ = run_capture(Command::new(crate::platform::tool("wsl")).args(["-d", &distro, "--", "bash", "-c", "pkill -f igneum-prove-host; pkill -f prove-shard.sh; true"]), Duration::from_secs(30));
}
sink.stage("uploading the results");
let mut uploaded = Vec::new();