5865N/A# http://sourceforge.net/p/net-snmp/code/ci/76e8d6d100320629d8a23be4b0128619600c919d/
5865N/A# CVE-2014-2285
5865N/A# https://security-tracker.debian.org/tracker/CVE-2014-2285
5865N/A# The perl_trapd_handler function in perl/TrapReceiver/TrapReceiver.xs in
5865N/A# Net-SNMP 5.7.3.pre3 and earlier, when using certain Perl versions, allows
5865N/A# remote attackers to cause a denial of service (snmptrapd crash) via an empty
5865N/A# community string in an SNMP trap, which triggers a NULL pointer dereference
5865N/A# within the newSVpv function in Perl.
5865N/A#
5865N/A# Fix picked from upstream. Will be available in 5.7.3 and above.
5865N/A#
5865N/A--- net-snmp-5.7.2.1/perl/TrapReceiver/TrapReceiver.xs Wed Feb 19 16:36:42 2014
5865N/A+++ TrapReceiver.xs Thu Oct 30 02:48:45 2014
5865N/A@@ -81,18 +81,18 @@
3181N/A STOREPDUi("securitymodel", pdu->securityModel);
3181N/A STOREPDUi("securitylevel", pdu->securityLevel);
3181N/A STOREPDU("contextName",
3181N/A- newSVpv(pdu->contextName, pdu->contextNameLen));
3181N/A+ newSVpv(pdu->contextName ? pdu->contextName : "", pdu->contextNameLen));
3181N/A STOREPDU("contextEngineID",
5865N/A- newSVpv((char *) pdu->contextEngineID,
3181N/A+ newSVpv(pdu->contextEngineID ? (char *) pdu->contextEngineID : "",
3181N/A pdu->contextEngineIDLen));
3181N/A STOREPDU("securityEngineID",
5865N/A- newSVpv((char *) pdu->securityEngineID,
3181N/A+ newSVpv(pdu->securityEngineID ? (char *) pdu->securityEngineID : "",
3181N/A pdu->securityEngineIDLen));
3181N/A STOREPDU("securityName",
5865N/A- newSVpv((char *) pdu->securityName, pdu->securityNameLen));
3181N/A+ newSVpv(pdu->securityName ? (char *) pdu->securityName : "", pdu->securityNameLen));
3181N/A } else {
3181N/A STOREPDU("community",
5865N/A- newSVpv((char *) pdu->community, pdu->community_len));
3181N/A+ newSVpv(pdu->community ? (char *) pdu->community : "", pdu->community_len));
3181N/A }
3181N/A
3181N/A if (transport && transport->f_fmtaddr) {