[Git][NTPsec/ntpsec][proto-refactor] Fix extension length calculation

Daniel Fox Franke gitlab at mg.gitlab.com
Sat Jul 9 00:07:49 UTC 2016


Daniel Fox Franke pushed to branch proto-refactor at NTPsec / ntpsec


Commits:
d9c6983b by Daniel Fox Franke at 2016-07-08T20:06:24-04:00
Fix extension length calculation

This was a nasty vulnerability, fortunately found quickly and before
merging to master.

- - - - -


1 changed file:

- ntpd/ntp_proto.c


Changes:

=====================================
ntpd/ntp_proto.c
=====================================
--- a/ntpd/ntp_proto.c
+++ b/ntpd/ntp_proto.c
@@ -301,7 +301,7 @@ parse_packet(
 			if(pkt->extensions[i].body == NULL) { goto fail; }
 			memcpy(pkt->extensions[i].body, bufptr + 4,
 			       pkt->extensions[i].len);
-			bufptr += pkt->extensions[i].len;
+			bufptr += pkt->extensions[i].len + 4;
 		}
 	}
 



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/d9c6983be2ebc008339b602b2b379df8d73783f4
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160709/6dc95632/attachment.html>


More information about the vc mailing list