Group :: Security/Networking
RPM: ipsec-tools
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: isakmp.c.diff
Download
Download
--- ipsec-tools/src/racoon/isakmp.c 2004/03/03 05:39:58 1.180
+++ ipsec-tools/src/racoon/isakmp.c 2004/03/31 03:14:39 1.181
@@ -181,6 +181,18 @@ isakmp_handler(so_isakmp)
plog(LLV_ERROR, LOCATION, (struct sockaddr *)&remote,
"packet shorter than isakmp header size.\n");
/* dummy receive */
+ if ((len = recvfrom(so_isakmp, (char *)&isakmp, sizeof(isakmp),
+ 0, (struct sockaddr *)&remote, &remote_len)) < 0) {
+ plog(LLV_ERROR, LOCATION, NULL,
+ "failed to receive isakmp packet\n");
+ }
+ goto end;
+ }
+
+ /* reject it if the size is tooooo big. */
+ if (ntohl(isakmp.len) > 0xffff) {
+ plog(LLV_ERROR, LOCATION, NULL,
+ "the length of the isakmp header is too big.\n");
if ((len = recvfrom(so_isakmp, (char *)&isakmp, sizeof(isakmp),
0, (struct sockaddr *)&remote, &remote_len)) < 0) {
plog(LLV_ERROR, LOCATION, NULL,