DOG-009 HIGH: HOME adopts untrusted .be anchors — store-root redirect, TOML injection

dog/HOME.c's cwd-walk discovery is the git CVE-2022-24765 class: it probes every ancestor for .be and adopts the first hit with ZERO trust validation. For a secondary-worktree anchor (a .be regular file), home_anchor_resolve (HOME.c:637-682) takes row-0's URI path VERBATIM and makes it h->root — the store root — with no ownership check, no symlink rejection (FILEStat follows symlinks; FILELStat exists and is unused), and no containment/absolute-path requirement. Running any dog inside a hostile cloned/untarred directory then routes rw opens (home_ensure_markers, DOGPupCreate) to an attacker-chosen path. Separately home_bootstrap_config (HOME.c:110-125) writes git config user.name/email into .be/config as name = "<value>" with NO escaping, so a value containing " or \n injects arbitrary TOML (e.g. forging the HOMEHost ref-authority). Method: Issues.

Input

Context

Goals

Constraints

WIP

Design decisions

TODOs

Blockers and bummers

Outcome