Page MenuHomeFreeBSD

tcp: avoid disclosing uninitialize data in tcp_log code
AcceptedPublic

Authored by chs on Thu, Sep 24, 12:09 AM.
Tags
None
Referenced Files
F173249043: D59950.id187547.diff
Thu, Sep 24, 4:55 PM
F173243842: D59950.diff
Thu, Sep 24, 3:40 PM
F173228327: D59950.diff
Thu, Sep 24, 12:08 PM
F173219043: D59950.id187547.diff
Thu, Sep 24, 9:49 AM
F173210495: D59950.diff
Thu, Sep 24, 8:06 AM
F173210469: D59950.id187547.diff
Thu, Sep 24, 8:05 AM
F173203622: D59950.id.diff
Thu, Sep 24, 6:56 AM
F173188760: D59950.diff
Thu, Sep 24, 4:40 AM

Details

Reviewers
imp
nickbanks_netflix.com
tuexen
Group Reviewers
transport
Summary

Zero various structures completely before filling in parts of them,
since we copy these entire structures out to userspace later.
Found with KMSAN.

Sponsored by: Netflix
Assisted-By: Claude Code - Opus 5 (1M context)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 77234
Build 74117: arc lint + arc unit

Event Timeline

chs requested review of this revision.Thu, Sep 24, 12:09 AM
This revision is now accepted and ready to land.Thu, Sep 24, 12:19 PM
tuexen added a subscriber: tuexen.
tuexen added inline comments.
sys/netinet/tcp_log_buf.c
1910

This is not needed. optlen can't be negative.

sys/netinet/tcp_log_buf.c
1907

Right now, sizeof(log_buf->tlb_opts) is TCP_MAXOLEN and therefore the optlen can't be larger than `TCP_MAXOLEN. So this is not needed.