Row creation in snmpTargetAddrTable fails in 64-bit version
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Net-SNMP |
Unknown
|
Unknown
|
|||
net-snmp (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
When trying to create a row in the snmpTargetAddrTable in a 64-bit system the attempt fails with this error:
ddskufo@
SNMP-TARGET-
ddskufo@
Error in packet.
Reason: wrongLength (The set value has an illegal length from what the agent expects)
Failed object: SNMP-TARGET-
The error is located to this piece of code on row 1504 in net-snmp/
if (var_val_len != sizeof(int)) {
char s[128];
return SNMP_ERR_
}
var_val_len is reported as 4
sizeof(int) in a 64-bit system
And 4 != 8, which means SNMP_ERR_
In the case sizeof(int) should be replaced with 4 and the if statement should look like:
if (var_val_len != 4) {
It would be suitable for both 32-bit and 64-bit systems.
Package information:
Package: snmpd
Priority: optional
Section: net
Installed-Size: 1228
Maintainer: Ubuntu Core Developers <email address hidden>
Original-
Architecture: amd64
Source: net-snmp
Version: 5.4.2.1~
Replaces: snmptraplogd
Depends: libc6 (>= 2.4), libsnmp15 (>= 5.4.2.1~dfsg), libwrap0 (>= 7.6-4~), debconf (>= 0.5) | debconf-2.0, adduser, debconf, lsb-base (>= 3.2-13)
Conflicts: snmp (<< 3.6-3), snmptraplogd
Filename: pool/main/
Size: 953054
MD5sum: 003d4e890109109
SHA1: 67805e1406c9ce5
SHA256: 1b923d0809e7b1c
Description: SNMP (Simple Network Management Protocol) agents
The Simple Network Management Protocol (SNMP) provides a framework
for the exchange of management information between agents (servers)
and clients.
.
The Net-SNMP agent is a daemon which listens for incoming SNMP
requests from clients and provides responses.
Homepage: http://
Bugs: https:/
Origin: Ubuntu
Supported: 5y
Changed in net-snmp (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
A corretion to data sizes above, the should be the otherway around.
var_val_len is reported as 8
sizeof(int) is 4 in a 64-bit system
And 8 != 4, which means SNMP_ERR_ WRONGLENGTH will be returned.
In the case sizeof(int) should be replaced with 4 and the if statement should look like:
if (var_val_len != 8) {
or possibly
if (var_val_len != sizeof(long)) {
This has been reported earlier for net-snmp: sourceforge. net/tracker/ index.php? func=detail& aid=2972579& group_id= 12694&atid= 112694
http://