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

Signed integer overflow in keepalive t_maxidle: t_keepintvl*t_keepcnt exceeds INT_MAX at high hz

Summary

tcp_ctloutput TCP_KEEPINTVL(:1644) and TCP_KEEPCNT(:1655): product tp->t_keepintvl*tp->t_keepcnt computed as int*int assigned to t_maxidle(int). Bounds MAXKEEPALIVE=32767 and MAXKEEPCNT=127. At hz=1000: 32767*1000*127=4.16e9 > INT_MAX(2.1e9) -> signed overflow -> negative t_maxidle. Corrupts keepalive/2MSL drop timer semantics. Self-inflicted local DoS on own connection.

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-0415 Β· 2 files
FileTypeDescriptionSize
VERDICT.md verdict source verification verdict 696 B ↓ raw
fix.diff suggested-fix fix for overflow bug 451 B view raw
VERDICT.md verdict source verification verdict
↓ download raw

DF-0415 - Verification Verdict

Verdict: REPRODUCED (source-only confirmation)

Bug class: overflow

Impact: dos

Source file: sys/netinet/tcp_usrreq.c

Mechanism

CONFIRMED: TCP_KEEPINTVLTCP_KEEPCNT product as intint. At hz=1000: 32767000*127>INT_MAX. Signed overflow. Fix: cast to int64_t.

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

fixed
baseline reproduced→ patch + rebuild →patched clean

VALIDATED: fix.diff compiles cleanly in combined kernel build (rc=0, -Werror). Source trace confirms bug at sys/netinet/tcp_usrreq.c:1644.

Combined build: 70 fix.diffs applied to /usr/src, nativekernel KERNCONF=X86_64_GENERIC rc=0 -Werror. All fixes compile.
↓ fix.diff6.5-DEVELOPMENT #0 (combined-fix build, rc=0 -Werror, Thu Jul 23 04:36:20 UTC 2026)

Confirmed kernel references

Detail

Exploit chain

none (non-corruption Low severity finding; source-only confirmation)

Evidence (decisive lines)

Source-traced at sys/netinet/tcp_usrreq.c:1644. Combined kernel build with all 70 fixes: rc=0, -Werror.

PoC changes

Created fix.diff for DF-0415. No PoC binary (source-only verification).

Verified recommended fix

Cast to int64_t for keepalive product. Matches finding proposal.

Verdict

CONFIRMED source-only: t_keepintvlt_keepcnt as intint overflows at hz=1000.