From: Guy Harris Date: Wed, 28 Aug 2024 07:09:46 +0000 (-0700) Subject: msdp: do some additional bounds checks. X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/39bafa636678ca3b0aa1ad88e2cdaedd06f5a33d?hp=39bafa636678ca3b0aa1ad88e2cdaedd06f5a33d msdp: do some additional bounds checks. Make sure we don't run past either 1) the end of the packet data (using ND_TCHECK_LEN() for fields we don't fetch and print) or 2) the end of the TLV (with a check of length before fetching the T and L, and checks of L before fetching any further data). Don't advance sp past the T and L, or decrement length for the T and L, before parsing the V, so we don't have to subtract 3 from sp in some cases. Add some comments. Define ND_LONGJMP_FROM_TCHECK to do new-style checks. (cherry picked from commit 66b6e1e05fc355052b34c8f3635bb696cd18f986) ---