Bug 275382 - uninitialized memory use in __tcp_run_hpts()
Summary: uninitialized memory use in __tcp_run_hpts()
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 14.0-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: Randall Stewart
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-27 17:43 UTC by Mark Johnston
Modified: 2024-01-23 18:39 UTC (History)
4 users (show)

See Also:
markj: mfc-stable14+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.