Commit vendor fix for l2tp vulnerability reported by
Przemyslaw Frasunek on bugtraq list.
This commit is contained in:
parent
9afd0c2902
commit
b97c9af58a
@ -476,8 +476,17 @@ l2tp_avp_print(const u_char *dat, int length)
|
||||
TCHECK(*ptr); /* Flags & Length */
|
||||
len = EXTRACT_16BITS(ptr) & L2TP_AVP_HDR_LEN_MASK;
|
||||
|
||||
/* If it is not long enough to decode the entire AVP, we'll
|
||||
abandon. */
|
||||
/* If it is not long enough to contain the header, we'll give up. */
|
||||
if (len < 6)
|
||||
goto trunc;
|
||||
|
||||
/* If it goes past the end of the remaining length of the packet,
|
||||
we'll give up. */
|
||||
if (len > (u_int)length)
|
||||
goto trunc;
|
||||
|
||||
/* If it goes past the end of the remaining length of the captured
|
||||
data, we'll give up. */
|
||||
TCHECK2(*ptr, len);
|
||||
/* After this point, no need to worry about truncation */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user