Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37904413
en ru br
ALT Linux repos
5.0: 0.7.1-alt1
4.1: 0.6.7-alt2.M41
4.0: 0.6.7-alt2.M40
3.0: 0.5-alt1

Group :: Security/Networking
RPM: ipsec-tools

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: isakmp.c.diff
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,
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin