DragonFlyBSD Kernel Audit
← triage · dashboard
DF-2930

_systimer_init_periodic(): SYSTF_100KHZSYNC phase-sync branch is dead code (missing else-if)

Field Value
ID DF-2930
Status new
Severity Info
CVSS 3.1 CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:N
CWE CWE-670
File sys/kern/kern_systimer.c
Lines 268-273
Area kern/timer
Confidence certain
Discovered 2026-09-02
Pass 2 (GLM 5.3 second pass)
Bucket base:kern
Reported pending
Known CVE none
CVE match novel

Summary

The SYSTF_100KHZSYNC computation at :268-269 is unconditionally overwritten by the following if/else — the second condition at :270 lacks 'else', so any flags combination with SYSTF_100KHZSYNC (and not MSSYNC) falls into the else (plain fromhz(freq)). systimer_init_periodic_nq100khz() therefore never delivers the documented 100kHz-ganged periods or the coincident-event ordering guarantees its API comment promises. No in-tree caller of nq100khz exists today — latent: the first future caller relying on the documented ordering semantics gets silently wrong timer phasing. Fix: make the second condition an 'else if'.

Timeline

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

Discussion (0)

No comments yet.