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)
Mon, May 4, 3:11 PM
Unknown Object (File)
Apr 21 2026, 7:44 PM
Unknown Object (File)
Apr 20 2026, 4:23 PM
Unknown Object (File)
Apr 20 2026, 4:14 AM
Unknown Object (File)
Apr 20 2026, 4:13 AM
Unknown Object (File)
Apr 17 2026, 1:16 PM
Unknown Object (File)
Apr 16 2026, 12:52 AM
Unknown Object (File)
Apr 11 2026, 4: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