This is the record of an abcd-managed repository

abcdBetav0.16.2 · 2026-11-06

Development record

memory ingest materialFromLocal reads a user-typed operand with Stat-then-ReadFile leaving a swap window and an uncapped-growth read

issueresolvednitpickiss-310

memory ingest materialFromLocal reads a user-typed operand with Stat-then-ReadFile leaving a swap window and an uncapped-growth read

Evidence

internal/core/memory/ingest.go:601-618 — os.Stat → IsRegular/size checks → os.ReadFile(resolved). The size cap is checked only against the Stat result; os.ReadFile is itself uncapped, so a regular file that GROWS after the Stat is read whole. A type/symlink swap in the window is not refused on the same fd. burst-6 claimed "EVERY CLI operand read now uses the one-call guarded primitive" — overstated by exactly this core-side site (abcd memory ingest <path> is a plugin-surface operand, commands/memory.md:31).

Adversarial verdict: CONFIRMED (nitpick)

Static-plant FIFO/device already refused by the IsRegular pre-check (not the same class as iss-202). Residual is the TOCTOU swap window + uncapped-growth read. EvalSymlinks at :591 fully resolves chains, so fsutil.ReadGuarded(resolved, maxFetchBytes) (O_NOFOLLOW on the leaf) works without breaking the legitimate symlink-source case. Fix: swap the read for ReadGuarded, keep the Stat pre-check (belt-and-suspenders, per iss-109), map sentinels onto existing messages. Repo precedent (readLessonsPayload/readSynthesisPayload in burst-6) is to convert.

Frontmatter

idiss-310
typeissue
lifecycleresolved
severitynitpick

mentions3