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)
Wed, Nov 5, 3:42 PM
Unknown Object (File)
Wed, Nov 5, 2:28 PM
Unknown Object (File)
Wed, Nov 5, 2:23 PM
Unknown Object (File)
Tue, Nov 4, 10:21 AM
Unknown Object (File)
Tue, Nov 4, 9:03 AM
Unknown Object (File)
Sun, Nov 2, 7:47 AM
Unknown Object (File)
Fri, Oct 24, 12:38 AM
Unknown Object (File)
Thu, Oct 23, 3:09 AM
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