Page MenuHomeFreeBSD

Avoid dereferencing a NULL pointer when TCP_REASS_LOGGING is enabled
ClosedPublic

Authored by tuexen on Feb 19 2019, 10:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Feb 8, 3:38 PM
Unknown Object (File)
Sun, Feb 8, 5:29 AM
Unknown Object (File)
Sat, Feb 7, 8:13 PM
Unknown Object (File)
Sat, Feb 7, 2:20 AM
Unknown Object (File)
Fri, Jan 30, 11:48 PM
Unknown Object (File)
Jan 10 2026, 12:30 AM
Unknown Object (File)
Dec 30 2025, 10:41 AM
Unknown Object (File)
Dec 18 2025, 5:05 PM
Subscribers

Details

Summary

This patch addresses an issue brought up by bz@ in D18968: When TCP_REASS_LOGGING is defined (which doesn't compile right now), a NULL pointer dereference would happen, if user data was received during the TCP handshake and BB logging is used.

A KASSERT is also added to detect tcp_reass() calls with illegal parameter combinations.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 22625

Event Timeline

tuexen retitled this revision from Avoid dereferencing a NULL point when TCP_REASS_LOGGING is enabled to Avoid dereferencing a NULL pointer when TCP_REASS_LOGGING is enabled.Feb 20 2019, 6:05 PM
sys/netinet/tcp_reass.c
549

Please add %p and others to the printf so people will be able to have pointers to the tp, th, ..., m for debugging in case this fires.
Will also help them to find out which illegal combination it was.

tuexen added inline comments.
sys/netinet/tcp_reass.c
549

Good suggestion.Diff updated.

This revision is now accepted and ready to land.Feb 20 2019, 8:31 PM
This revision was automatically updated to reflect the committed changes.