
racewalk
racewalk finds filesystem races in command-line tools. A tool checks a path and then uses it, and a local user who owns the directory swaps the name for a symlink in between. racewalk makes that swap on purpose. It runs the command under ptrace, stops it before each syscall that takes a path, plants the link, and lets the command finish. Then it looks at the canary, a directory the command should never reach.
There is no timing luck. The same command, files and swap give the same result on every run. A swap counts as a race only if it does harm when planted mid-run and does none when the link was there from the start. Plain symlink following is listed apart, so a maintainer is not sent a false alarm.
It exists because Ubuntu now ships Rust rewrites of its core tools, and open races of this kind kept cp, mv and rm on GNU in 26.04 LTS. The output is built for the people who maintain and package those tools. attack exits with status 1 on a race, so it can gate a CI job.
GitHub Repository: https://github.com/frdrckj/racewalk
A finding
mkfifo -m 666 fifo in uutils coreutils 0.8.0 creates the FIFO, then sets its mode by path (CVE-2026-35352). racewalk reports it like this:
mkfifo-mode on uutils-0.8.0: RACE
2 windows, 3 attempts: 1 race, 0 follows link, 2 clean, 0 unreached, 0 hang, 0 crash
#2 RACE before fchmodat(fifo), occurrence 1: fifo -> canary file
effect: mode changed: secret
attacker: a local user who owns the directory the command works in
controls: swapped fifo for a symlink between two steps of the command
gains: the command changed the mode of a file outside that directory
replay: racewalk replay scenarios/mkfifo-mode.toml --target uutils-0.8.0=/path/to/racewalk/targets/uutils-0.8.0/bin --finding 2Features
- Every window, one swap per run: A clean run records each path syscall that touches the directory the command works in. Each one is a window. racewalk then runs the command again once per window and swap. No code is written for one specific race.
- Three kinds of run: Clean, static, and raced. The static run plants the link before the command starts. The verdict compares what happened to the canary across the three.
- Swaps point into the canary only: The link leads to a secret file, or to a copy of a directory's names, inside the canary. Deleted, created, changed, and leaked files there are the evidence.
- A replay for every finding:
racewalk replayruns one window and one swap again and prints the syscalls of that run. - The threat model in the output: Each finding says who the attacker is, what they control, and what they gain. Those are the three questions the uutils security policy asks of a report.
- Scenarios in TOML: A scenario is a command and the files it starts with. Unknown keys are rejected before anything runs, and so are file paths that leave the working directory.
- Proof on public bugs: Five scenarios describe races that were fixed by uutils coreutils 0.10.0, four of them with CVE numbers. Against 0.8.0 all five report a race, in about a second together, and a second run gives the same output byte for byte.
- Limits stated up front: Coverage is the scenarios. One swap per run.
no race foundnever means race free.
Stack
• Tracer
- Rust - One crate, one binary. Linux 5.3 or later on x86_64 or aarch64, and no root.
- nix and libc - ptrace with
PTRACE_GET_SYSCALL_INFO. Paths are read from/proc/<tid>/mem. All unsafe code sits in one module.
• CLI and scenarios
- clap -
racewalkcommands:trace,attack, andreplay. - serde and toml - Scenario files.
attack --jsonprints the report as JSON.
• Checks
- Self-test - Small racy and fixed victim programs in pairs. racewalk has to flag every racy one and pass every fixed one.
- GitHub Actions - fmt, clippy with warnings denied, the self-test on x86_64 and arm64, and
cargo audit. A weekly job runs the 0.8.0 proof.