Page MenuHomeFreeBSD

tcpdump: cope with incorrect packet lengths
ClosedPublic

Authored by kp on Apr 1 2024, 2:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Mar 28, 4:23 AM
Unknown Object (File)
Feb 9 2026, 12:18 AM
Unknown Object (File)
Feb 7 2026, 10:19 PM
Unknown Object (File)
Feb 7 2026, 7:21 PM
Unknown Object (File)
Feb 7 2026, 12:41 AM
Unknown Object (File)
Feb 2 2026, 9:53 PM
Unknown Object (File)
Feb 1 2026, 2:47 PM
Unknown Object (File)
Jan 31 2026, 6:43 PM
Subscribers

Details

Summary

It's possible for the capture buffer to be smaller than indicated by the
header length. However, pfsync_print() only took the header length into
account. As a result we could read outside of the buffer.

Check that we have at least the expected amount of data before we start
parsing.

PR: 278034
Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable