RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1695363 - MIB pass-through does NOT pass STRING VALUE for snmpset STRING oid type
Summary: MIB pass-through does NOT pass STRING VALUE for snmpset STRING oid type
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: net-snmp
Version: 7.6
Hardware: All
OS: All
high
high
Target Milestone: rc
: ---
Assignee: Josef Ridky
QA Contact: David Jež
URL:
Whiteboard:
Depends On:
Blocks: 1716965
TreeView+ depends on / blocked
 
Reported: 2019-04-02 22:50 UTC by Chris Cheney
Modified: 2023-09-07 19:53 UTC (History)
6 users (show)

Fixed In Version: net-snmp-5.7.2-44.el7
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-31 19:54:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2020:1081 0 None None None 2020-03-31 19:55:09 UTC

Description Chris Cheney 2019-04-02 22:50:34 UTC
Description of problem:

  snmpd does not pass through snmpset 'string' types to 'pass' scripts.

  This was fixed in upstream net-snmp 5.7.3 shortly after the version in RHEL7.

  https://sourceforge.net/p/net-snmp/mailman/message/34272858/


Version-Release number of selected component (if applicable):

  net-snmp 5.7.2


How reproducible:

  Every time.


Steps to Reproduce:

  I created a simple reproducer:

        Slightly modified stock /etc/snmp/snmpd.conf

          $ cat /etc/snmp/snmpd.conf | grep -v "^#\|^$"
          com2sec notConfigUser  default       public
          group   notConfigGroup v1           notConfigUser
          group   notConfigGroup v2c           notConfigUser
          view    systemview    included   .1.3.6.1.2.1.1
          view    systemview    included   .1.3.6.1.2.1.25.1.1
          view    systemview      included        .1                                            <- Modified
          access  notConfigGroup ""      any       noauth    exact  systemview systemview none  <- Modified
          syslocation Unknown (edit /etc/snmp/snmpd.conf)
          syscontact Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
          dontLogTCPWrappersConnects yes
          pass 1.3.6.1.4.1.103.1.23.1 /root/passtest                                            <- Modified

        Simple test script that does nothing but write out the args:

          $ cat passtest
          #!/bin/bash
          date >> /tmp/passtest.log
          echo $\@ - $@ >> /tmp/passtest.log

        Running snmpget works (error is due to simple script):

          $ snmpget -v 1 -c public localhost .1.3.6.1.4.1.103.1.23.1
          Error in packet
          Reason: (noSuchName) There is no such variable name in this MIB.
          Failed object: SNMPv2-SMI::enterprises.103.1.23.1

          $ cat /tmp/passtest.log 
          Tue Apr  2 17:36:19 CDT 2019
          $@ - -g .1.3.6.1.4.1.103.1.23.1

        Running snmpset works for integer type:

          $ snmpset -v 1 -c public localhost .1.3.6.1.4.1.103.1.23.1 integer 613
          SNMPv2-SMI::enterprises.103.1.23.1 = INTEGER: 613

          $ cat /tmp/passtest.log 
          Tue Apr  2 17:34:54 CDT 2019
          $@ - -g .1.3.6.1.4.1.103.1.23.1
          Tue Apr  2 17:34:54 CDT 2019
          $@ - -s .1.3.6.1.4.1.103.1.23.1 integer 613

        Running snmpset does NOT work for string type:

          $ snmpset -v 1 -c public localhost .1.3.6.1.4.1.103.1.23.1 string "hello"
          SNMPv2-SMI::enterprises.103.1.23.1 = STRING: "hello"

          $ cat /tmp/passtest.log 
          Tue Apr  2 17:38:01 CDT 2019
          $@ - -g .1.3.6.1.4.1.103.1.23.1
          Tue Apr  2 17:38:01 CDT 2019
          $@ - -s .1.3.6.1.4.1.103.1.23.1 string


Actual results:

   snmpset is not passing the actual _string value_ when setting a 'string' oid


Expected results:

  snmpset should also pass the actual _string value_ when setting a 'string' oid

Comment 9 errata-xmlrpc 2020-03-31 19:54:44 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:1081


Note You need to log in before you can comment on or make changes to this bug.