sc_flags assign instead of OR wipes SCF_HASH and negotiated-option flags on TF_NOOPT listener
Summary
After sc->sc_flags=SCF_HASH(:1064) and correct |= additions(SCF_TIMESTAMP:1085,SCF_WINSCALE:1097,SCF_SACK_PERMITTED:1101), code does sc->sc_flags=SCF_NOOPT(:1102-1103) and sc->sc_flags=SCF_SIGNATURE(:1112-1113) β direct assign not |=. Clears SCF_HASH which syncache_respond requires via KASSERT(:1319) + uses via m_sethash(m,sc_hashval)(:1320). DEBUG kernel panics on every SYN to TF_NOOPT listener. Production: cleared flags propagate to tcpcb in syncache_socket(:839-853) -> connection loses timestamps/win-scale/SACK. Fix: use |= not =.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-0487 Β· 2 files| File | Type | Description | Size | |
|---|---|---|---|---|
| VERDICT.md | verdict | source verification verdict | 709 B | β raw |
| fix.diff | suggested-fix | fix for logic bug | 672 B | view raw |
DF-0487 - Verification Verdict
Verdict: REPRODUCED (source-only confirmation)
Bug class: logic
Impact: none
Source file: sys/netinet/tcp_syncache.c
Mechanism
CONFIRMED: sc->sc_flags=SCF_NOOPT/SCF_SIGNATURE uses = instead of |=. Clears previously set flags (SCF_HASH, SCF_TIMESTAMP, etc). Fix: use |=.
Fix
See fix.diff for the git-apply-able patch.
Build validation
Combined kernel build with all 70 Low-severity fixes: rc=0, -Werror.
All fixes compile cleanly in X86_64_GENERIC kernel configuration.
Guest: DragonFly dfbsd 6.5-DEVELOPMENT DragonFly 6.5-DEVELOPMENT #0: Thu Jul 2 06:02:54 UTC 2026 root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64
Fix verification
fixedVALIDATED: fix.diff compiles cleanly in combined kernel build (rc=0, -Werror). Source trace confirms bug at sys/netinet/tcp_syncache.c:1102.
Combined build: 70 fix.diffs applied to /usr/src, nativekernel KERNCONF=X86_64_GENERIC rc=0 -Werror. All fixes compile.
Confirmed kernel references
- s
- y
- s
- /
- n
- e
- t
- i
- n
- e
- t
- /
- t
- c
- p
- _
- s
- y
- n
- c
- a
- c
- h
- e
- .
- c
- :
- 1
- 1
- 0
- 2
Detail
Exploit chain
none (non-corruption Low severity finding; source-only confirmation)
Evidence (decisive lines)
Source-traced at sys/netinet/tcp_syncache.c:1102. Combined kernel build with all 70 fixes: rc=0, -Werror.
PoC changes
Created fix.diff for DF-0487. No PoC binary (source-only verification).
Verified recommended fix
Change = to |= for SCF_NOOPT and SCF_SIGNATURE. Matches finding proposal.
Verdict
CONFIRMED source-only: sc_flags=SCF_NOOPT/SCF_SIGNATURE uses = not |=. Clears prior flags.
No comments yet.