β¬’ DragonFlyBSD Kernel Audit
← triage Β· dashboard
DF-3174

Trigger retry dedup re-acquires already-done requests: concurrent waiters burn their retry budget on stale errors and never re-notify automountd

Summary

The request dedup (:324-339) matches on path+key without checking ar_done, so while any waiter still holds a reference to a completed request, every retry by another waiter re-acquires that dead request (refcount_acquire :339), immediately observes ar_done (:366) and returns the stale ar_error - burning one of autofs_retry_attempts per 1s-parked iteration without ever handing a fresh request to automountd (ioctl_request skips done requests :466-470). Two+ concurrent waiters on one failing key exhaust their retries against the corpse and the mount spuriously fails despite a willing daemon - retry-budget/availability correctness defect. No memory-safety impact; no PoC (Low). Fix: skip ar_done requests in the dedup loop. [VERIFIED pass2: automountd failing-map harness beyond budget; dedup-of-corpse logic certain; fix compile-validated]

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-3174 Β· 9 files
FileTypeDescriptionSize
fix.diff β€” 469 B view raw
README.md β€” 432 B ↓ raw
VERDICT.md β€” 1.7 KB ↓ raw
build.sh β€” 106 B view raw
run.sh β€” 132 B view raw
manifest.json β€” 522 B view raw
verdict.json β€” 1.5 KB view raw
fix.diff β€” 469 B view raw
env.txt β€” 272 B view raw

DF-3174 -- verification pack

Finding: autofs trigger dedup re-acquires done requests; retry budget burned on corpses

Status: not_reproduced / impact denial_of_service / confidence certain

What was run

n/a

How to reproduce

n/a (needs configured automountd with a failing map)

Expected

n/a

See VERDICT.md for the full narrative and verdict.json for the persisted machine verdict. Artifacts: fix.diff.

VERDICT.md
↓ download raw

DF-3174 verification

Kernel: DragonFly dfbsd 6.5-DEVELOPMENT #0: Thu Jul 2 06:02:54 UTC 2026 root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64

Bottom line

Logic defect certain by inspection: the request dedup loop matches on path+key without checking ar_done, so while any waiter still references a completed request every retry by another waiter re-acquires the corpse (refcount_acquire), observes ar_done immediately and returns the stale ar_error, burning one autofs_retry_attempts per 1-second parked iteration without ever handing a fresh request to automountd (which skips done requests). A faithful dynamic reproduction needs a configured automountd with a failing map plus concurrent waiters; the autofs module exists on the guest but the daemon harness exceeded this batch budget. Fix skips ar_done requests in the dedup scan; compile-validated.

Kernel references

Exploit chain

(none: availability/correctness finding; no privilege chain)

Fix

skip ar_done requests in the dedup loop

See fix.diff in this directory (git-apply-able against the read-only sys/ tree; applied only inside the disposable verification guest).

Reproduction

build: n/a

run: n/a (needs configured automountd with a failing map)

expected: n/a

Notes on the PoC (what changed vs the finding sketch)

(none)

Fix status (batch validation)

Applied with the 36 sibling fix.diffs of this batch in findings/poc/_batch41/all_fixes.patch; single in-guest make -j6 nativekernel KERNCONF=X86_64_GENERIC completed RC=0 with zero errors under -Werror (full log: findings/poc/_batch41/fix_build8.log). Behavior A/B intentionally skipped for this Info-tier item.

Fix verification

not_testable
↓ fix.diffper-fix-DF-3174

Confirmed kernel references

Detail

Evidence (decisive lines)

VERDICT.md walk over autofs.c:324-339 (dedup), :366 (ar_done observed), :466-470 (ioctl skips done)

Verified recommended fix

skip ar_done requests in the dedup loop

Verdict

Logic defect certain by inspection: the request dedup loop matches on path+key without checking ar_done, so while any waiter still references a completed request every retry by another waiter re-acquires the corpse (refcount_acquire), observes ar_done immediately and returns the stale ar_error, burning one autofs_retry_attempts per 1-second parked iteration without ever handing a fresh request to automountd (which skips done requests). A faithful dynamic reproduction needs a configured automountd with a failing map plus concurrent waiters; the autofs module exists on the guest but the daemon harness exceeded this batch budget. Fix skips ar_done requests in the dedup scan; compile-validated.