Tracking bug for Counter64-in-SNMPv1-response problems (RFC2576 sec 4.1.2.1)

Description

This bug is meant to track all bugs describing third-party SNMP agents that incorrectly include Counter64 varbinds in SNMPv1 response PDUs. This behavior is in violation of RFC2576 section 4.1.2.1, which states that:

4.1.2.1. Handling Counter64

The SMIv2 [7] defines one new syntax that is incompatible with SMIv1.
This syntax is Counter64. All other syntaxes defined by SMIv2 are
compatible with SMIv1.

The impact on multi-lingual command responders is that they MUST NOT
ever return a variable binding containing a Counter64 value in a
response to a request that was received using the SNMPv1 message
version.

Multi-lingual command responders SHALL take the approach that object
instances whose type is Counter64 are implicitly excluded from view
when processing an SNMPv1 message. So:

  • On receipt of an SNMPv1 GetRequest-PDU containing a variable
    binding whose name field points to an object instance of type
    Counter64, a GetResponsePDU SHALL be returned, with an error-
    status of noSuchName and the error-index set to the variable
    binding that caused this error.

  • On an SNMPv1 GetNextRequest-PDU, any object instance which
    contains a syntax of Counter64 SHALL be skipped, and the next
    accessible object instance that does not have the syntax of
    Counter64 SHALL be retrieved. If no such object instance
    exists, then an error-status of noSuchName SHALL be returned,
    and the error-index SHALL be set to the variable binding that
    caused this error.

  • Any SNMPv1 request which contains a variable binding with a
    Counter64 value is ill-formed, so the foregoing rules do not
    apply. If that error is detected, a response SHALL NOT be
    returned, since it would contain a copy of the ill-formed
    variable binding. Instead, the offending PDU SHALL be
    discarded and the counter snmpInASNParseErrs SHALL be
    incremented.

Environment

Operating System: All Platform: All URL: http://www.ietf.org/rfc/rfc2576

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Mike Huot November 29, 2022 at 3:12 PM

Just in case someone trips across this, in opennms.properties this can be used to allow the misbehavior -

  1. Some buggy SNMP agents fail to exclude Counter64 objects from view when

  2. responding to SNMPv1 requests (as mandated by RFC3584 § 4.2.2.1). To relax

  3. handling of v1 responses to permit Counter64 varbinds rather than discarding

  4. them as ill-formed (per the same RFC), set this property to true.
    org.opennms.snmp.snmp4j.allowSNMPv2InV1=true

Details

Assignee

Reporter

Labels

Components

Affects versions

Priority

PagerDuty

Created February 29, 2008 at 9:37 AM
Updated November 29, 2022 at 3:12 PM