Bug 275382

Summary: uninitialized memory use in __tcp_run_hpts()
Product: Base System Reporter: Mark Johnston <markj>
Component: kernAssignee: Randall Stewart <rrs>
Status: Closed FIXED    
Severity: Affects Only Me CC: gbe, glebius, rrs, tuexen
Priority: --- Flags: markj: mfc-stable14+
Version: 14.0-RELEASE   
Hardware: Any   
OS: Any   

Description Mark Johnston freebsd_committer freebsd_triage 2023-11-27 17:43:59 UTC
Coverity reports that tv.tv_sec is uninitialized when passed to tvtosbt(), which returns the timeout used for the HPTS callout.  Presumably the intent is to initialize it to 0?

I also see that in tcp_run_hpts(), "hpts" is declared as static, but that is not thread safe and doesn't make sense to me.
Comment 1 Gleb Smirnoff freebsd_committer freebsd_triage 2023-11-27 19:18:48 UTC
The second find is super weird! Thanks for reporting. I also noticed the recent Coverity report.
Comment 2 Michael Tuexen freebsd_committer freebsd_triage 2023-11-27 19:45:01 UTC
rrs@ fixed both issues in https://cgit.FreeBSD.org/src/commit/?id=6a79e48076bcce3e902323e62689eacb98faa180
Comment 3 Mark Johnston freebsd_committer freebsd_triage 2024-01-23 18:39:41 UTC
MFCed now.