Effectively my code is calling usm_parse_create_usmUser() and a segmentation
fault is reported.
Stepping into the usm_parse_create_usmUser code in gdb, I find that the malloc
call when processing the '-e' flag and engine id within in snmpv3.c is
returning 0xFF00. This is clearly having a knock on effect when that invalid
memory block is access later down the call stack.
net-snmp code versions:
5.4.2.1, 5.5 and 5.6 (I've tried later versions from my initial 5.4.2.1
code to see if it's a bug in the earlier version).
Platforms:
SunOS herby 5.8 Generic_108528-13 sun4u sparc SUNW,UltraAX-i2
and
SunOS larry 5.6 Generic_105181-03 sun4u sparc SUNW,Ultra-5_10
Everything works fine on Windows (XP Pro and Server 2003) and Suse Linux
The call stack looks as follows:
#0 0xfefb3344 in strlen () from /usr/lib/libc.so.1
#1 0xff002f40 in _doprnt () from /usr/lib/libc.so.1
#2 0xff004c84 in snprintf () from /usr/lib/libc.so.1
#3 0x000c0fd4 in config_vlog (level=3, levelmsg=0x1221a8 "Error", str=0x121e00
"%s",
args=0xffbedb38) at read_config.c:1439
#4 0x000c1060 in netsnmp_config_error (str=0x121e00 "%s") at read_config.c:1456
#5 0x000c10c4 in config_perror (str=0x123010 "invalid EngineID argument to -e")
at read_config.c:1473
#6 0x000c6420 in usm_parse_create_usmUser (token=0x113e18 "createUser",
line=0x0)
at snmpv3.c:799
#7 0x0005e3d0 in CITLSNMPExtract::vGetDevicesFromIni (this=0x16f670)
at ITLSNMPExtract.cpp:1872
#8 0x0004cb24 in CITLSNMPExtract::bIsLogPresent (this=0x16f670)
at ITLSNMPExtract.cpp:898
#9 0x000640d4 in CExtract::bCreate (this=0x16f670) at extract.cpp:957
#10 0x0004b730 in CITLSNMPExtract::bCreate (this=0x16f670) at
ITLSNMPExtract.cpp:418
#11 0x0005fce4 in main (argc=4, argv=0xffbefb94) at ITLSNMPExtract.cpp:2247
This would suggest that there is some kind of libc conflict but I'm at a loss
to figure it out.
The line of code is
u_char *ebuf = (u_char *) malloc(ebuf_len);
within usm_parse_create_usmUser()
I'm reasonably proficient finding my way around Solaris, but by no means an
expert so my apologies if I've missed out some details.
I'd be most grateful for any help with this problem.
________________________________
***** Email confidentiality notice *****
This message is private and confidential. If you have received this message in
error, please notify us and remove it from your system.
Insider Technologies Limited is a company registered in England and Wales
(Company Number: 2352867) and its registered office is at: Spinnaker Court,
Chandlers Point, 37 Broadway, Salford Quays, MANCHESTER, United Kingdom, M50 2YR
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users