tighten isakmp header length validation. from kame
This commit is contained in:
parent
b6aefbe19f
commit
bcb0cf6929
4
crypto/dist/kame/racoon/isakmp.c
vendored
4
crypto/dist/kame/racoon/isakmp.c
vendored
@ -173,8 +173,8 @@ isakmp_handler(so_isakmp)
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* check isakmp header length */
|
||||
if (len < sizeof(isakmp)) {
|
||||
/* check isakmp header length, as well as sanity of header length */
|
||||
if (len < sizeof(isakmp) || ntohl(isakmp.len) < sizeof(isakmp)) {
|
||||
plog(LLV_ERROR, LOCATION, (struct sockaddr *)&remote,
|
||||
"packet shorter than isakmp header size.\n");
|
||||
/* dummy receive */
|
||||
|
Loading…
Reference in New Issue
Block a user