On 16 March 2010 09:44,  <srikapilan.gan...@wipro.com> wrote:
> The crash occours only when you associate a host to that v3 user as below:
> trapsess -v 3  -l authNoPriv -u u4 xx.xx.xx.xx:162

Ah - I wondered what you meant by "associating a host".
I hadn't realised that you were talking about SNMPv3 trap destinations.

Try the attached patch

Dave
Index: snmplib/snmpusm.c
===================================================================
--- snmplib/snmpusm.c	(revision 18256)
+++ snmplib/snmpusm.c	(working copy)
@@ -2590,6 +2590,17 @@
 
             end_of_overhead = value_ptr;
 
+            if ( !user->privKey ) {
+                DEBUGMSGTL(("usm", "No privacy pass phrase for %s\n", user->secName));
+                if (snmp_increment_statistic(STAT_USMSTATSDECRYPTIONERRORS) ==
+                    0) {
+                    DEBUGMSGTL(("usm", "%s\n", "Failed increment statistic."));
+                }
+                usm_free_usmStateReference(*secStateRef);
+                *secStateRef = NULL;
+                return SNMPERR_USM_DECRYPTIONERROR;
+            }
+
             /*
              * XOR the salt with the last (iv_length) bytes
              * of the priv_key to obtain the IV.
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to