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

handle_workitem_freeblocks: indir_trunc errors silently swallowed β€” '== 0' dead store makes allerror unreachable, I/O errors during indirect-block deallocation unreported

Field Value
ID DF-2991
Status new
Severity Low
CVSS 3.1 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N
CWE CWE-754
File sys/vfs/ufs/ffs_softdep.c
Lines 2168-2170, 2188
Area vfs/ufs
Confidence certain
Discovered 2026-09-02
Pass 2 (GLM 5.3 second pass)
Bucket base:vfs
Reported pending
Known CVE none
CVE match novel

Summary

In handle_workitem_freeblocks, the loop over indirect blocks assigns 'if ((error = indir_trunc(...)) == 0) allerror = error;' β€” error is only assigned into allerror when it is 0, so allerror can never become non-zero and the DIAGNOSTIC error report at :2188-2189 is dead code. Real read/deallocation failures of indirect blocks are silently dropped (frees of the containing indirect blocks still proceed), so a filesystem can go inconsistent after transient I/O errors with no kernel indication, unlike ffs_truncate which propagates indir-truncation errors. Inverted comparison (should be '!= 0'); one-character fix. Requires an underlying device I/O error during background deallocation β€” robustness/consistency defect, not attacker-controllable.

Timeline

  • 2026-09-02 Discovered during pass-2 audit of ffs_softdep.c (GLM 5.3).

Discussion (0)

No comments yet.