Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Google Project Zero 16 min read Deep dive hardMaster

Testing race conditions with memory access tracing and stack-based delay injection

MAccConc is a set of tools for exploring thread interleavings of multi-threaded Linux kernel test cases to confirm, regression-test and eventually fuzz race condition bugs. It records memory accesses via KASAN outline instrumentation fed through KCOV, finds communication points (overlapping accesses where at least one is a write), and identifies accesses stably across runs with count-augmented stack traces built from a new LLVM SanitizerCoverage function entry/exit feature. A new KCOV_SET_DI ioctl injects wait/wake actions at specific accesses, supporting both happens-before constraints and fully specified context-switch orderings. An automatic A-B-A interleaving tester, a terminal UI and a GUI are demonstrated on a dup-vs-close race.

Assumes: Linux kernel internalsrace conditionsKASAN and sanitizersKCOV coverage

Related posts

  • On the Effectiveness of Mutational Grammar Fuzzing

    Google Project Zero hardMaster

    Coverage-guided mutational grammar fuzzing has two weaknesses. Coverage does not capture dataflow between calls, so a sample that chains document() into generate-id() to hit a libxslt bug looks no more interesting than two unrelated samples. Greedy corpus saving also yields many near-identical samples. A simple fix in Jackalope restarts a worker with an empty corpus every 2T seconds, letting it build an independent corpus for T seconds before syncing with a persistent server and fuzzing the combined corpus. In week-long libxslt experiments, T=3600 found more unique crashes, and found them faster, than uninterrupted default sessions, which varied between 2 and 5 crashes depending on starting conditions. The best T is likely target-dependent.

  • GPT-5.5-Cyber built a zlib fuzzing lab in a day

    Trail of Bits mediumAdept

    GPT-5.5-Cyber, driven through Codex's /goal command, independently chose dynamic testing over static review of heavily audited zlib and built a full fuzzing campaign in a day. It produced ASan/UBSan builds, seed corpora derived from existing edge-case tests, C/C++ harnesses across a dozen entrypoints (inflate, inflateBack, gzFile, MiniZip, puff, blast and more) and compile-time variant builds such as INFLATE_STRICT and BUILDFIXED. Its most productive harness reached valid gz* states that only arise under OS backpressure, and it yielded several findings now in coordinated disclosure. Strict validity rules for what counts as a reportable finding were key: the model logged an unreachable inflateBack null-callback crash and moved on. The recommendation is for defenders to run bespoke fuzzing first, because the expertise barrier to doing it has largely disappeared.

  • Magic-trace: Diagnosing tricky performance issues easily with Intel Processor Trace

    Jane Street Tech Blog hardMaster

    Magic-trace is an open-source tool that uses Intel Processor Trace in circular-buffer mode to capture roughly the last 10ms of execution before a chosen function call, then renders every function call on a nanosecond-resolution timeline in a forked Perfetto UI. Processor Trace records full control flow with about 30ns timing at 2-20% overhead and needs no instrumentation, which suits latency problems far shorter than a sampling profiler's 250µs interval. The build went from wrapping `perf` to using perf_event_open with libipt directly, and hardware breakpoints let it trigger snapshots on any function without the target's cooperation. Along the way it hit a kernel null-pointer bug and a suspected Skylake erratum, and it has already diagnosed 100ns inlining regressions and long Async cycles.

  • A thousand fewer paths to root

    OpenAI mediumAdept

    An autonomous five-stage pipeline (scouting, static analysis, KASAN-based dynamic validation, exploit development, patch generation, then human review) scanned the Linux kernel and produced 948 distinct working local privilege escalation exploits plus 291 info-leak PoCs from 2,308 candidate findings, at about $1.2M in API cost (~$1,279 per LPE). Scout agents narrowed the audit to 7% of the kernel, triage agents reproduced 74.7% of candidates with only 3.1% reflecting incorrect analysis, and exploits were developed against SMEP, SMAP, KASLR and HARDENED_USERCOPY. Because validation costs similar amounts for true and false positives, filtering false positives early is the main cost lever. The practical takeaway is to treat unpatched low-privilege access as effectively root, invest in sandboxing such as Firecracker and gVisor, and plan for automated patch generation and repeated scans with each model generation.

  • The case of the vanishing CPU: A Linux kernel debugging story

    ClickHouse hardMaster

    Intermittent, indefinite CPU saturation of ClickHouse Cloud pods, seen only on GCP, turned out to be a Linux kernel memory-management livelock. Pods sat just under their cgroup memory limit while every CPU spun in shrink_lruvec during memcg reclaim triggered by page-cache readahead on page faults. The investigation used gdb backtraces, bpftrace syscall latency histograms, perf top/stat, pidstat and an on-call runbook to reach a reproducible test case and a kernel fix, after which another kernel bug surfaced. One lesson along the way: signal-based user-space stack traces hide kernel time entirely, so gdb backtraces pointed the team at the wrong code.

The quest for software engineering knowledge.

Look:
Layout: