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 854925 - SNMP failed to auth if the password have space
Summary: SNMP failed to auth if the password have space
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ovirt-node
Version: 6.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Fabian Deutsch
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-06 10:19 UTC by Meng Liang
Modified: 2016-04-26 14:03 UTC (History)
13 users (show)

Fixed In Version: ovirt-node-2.5.0-5.el6
Doc Type: Bug Fix
Doc Text:
Previously, it was possible to accidentally include spaces when attempting to set the snmpd password. This would cause the authentication to fail later with an error saying 'password length is too short'. Now, spaces in passwords have been blocked with an appropriate error message.
Clone Of:
Environment:
Last Closed: 2013-02-28 16:38:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0556 0 normal SHIPPED_LIVE ovirt-node bug fix and enhancement update 2013-02-28 21:29:06 UTC

Description Meng Liang 2012-09-06 10:19:58 UTC
Description of problem:
when snmpd is set start with spcae like ' 1234567' or end with blank like '1234567 ', password can be saved successfully, but remote access fail due to 'password length is too short'.

Version-Release number of selected component (if applicable):
rhev-hypervisor6-6.3-20120815.0.el6_3

How reproducible:
Always

Steps to Reproduce:
1.Enable SNMP and set password as '12345678', press <Apply>
2.Change password to ' 2345678', press <Apply> (or '1234567 ')

  
Actual results:
The password could be changed and saved in /etc/snmp/snmpd.conf
[root@localhost admin]#cat /etc/snmp/snmpd.conf
master agentx
dontLogTCPWrappersConnects yes
rwuser root auth .1
createUser root SHA  2345678 AES

But on the remote terminal:
 [admin@(none) ~]$ snmpwalk -v3 -u root -l authPriv -a SHA -A  2345678 -x AES -X  2345678 10.66.11.115 sysDescr
 Error: passphrase chosen is below the length requirements of the USM (min=8).
 snmpwalk:  (The supplied password length is too short.)
 Error generating a key (Ku) from the supplied authentication pass phrase.

 [admin@(none) ~]$ snmpwalk -v3 -u root -l authPriv -a SHA -A ' 2345678' -x AES -X ' 2345678' 10.66.11.115 sysDescr
 snmpwalk: Authentication failure (incorrect password, community or key) (Sub-id not found: (top) -> sysDescr)

 [admin@(none) ~]$ snmpwalk -v3 -u root -l authPriv -a SHA -A “ 2345678” -x AES -X “ 2345678” 10.66.11.115 sysDescr
 snmpwalk: Authentication failure (incorrect password, community or key) (Sub-id not found: (top) -> sysDescr)


Expected results:
SNMP work correctly, showing SNMP Info on remote terminal
 or Cannot change the password successfully with Alert Message 'the password should not start or end with a blank'

Additional info:

Comment 2 Fabian Deutsch 2012-09-13 14:37:32 UTC
http://gerrit.ovirt.org/7991

This patch prevents the usage of spaces in the password.

I also tried circumventing this problem by using a hex representation and a quoted string in the configuration file. Both did not work.

Tested as follows:
1. Apply patch
2. Enter SNMP page
3. Pw+Confirmation "12345678"
works
4. Pw "1234567 " when leaving field the message appears: No spaces allowed. Field cleared
5. Pw "123456 7" when leaving field the message appears: No spaces allowed. Field cleared
6. Pw "1234567" when leaving field the message appears: Min 8 chars. Field cleared
7. No password, warning when hitting Apply

Comment 6 Fabian Deutsch 2012-09-27 13:17:52 UTC
Tested as in comment #2.

Comment 8 Meng Liang 2012-10-23 08:29:53 UTC
Test version:
rhev-hypervisor6-6.4-20121015.1.el6
Test steps and results:
1. Install rhevh 6.4
2. Enter SNMP page
3. Pw+Confirmation "12345678" works
4. Pw "1234567 "  =>'Password may not contain spaces'
5. Pw "123456 7"  =>'Password may not contain spaces'
6. Pw "      "    =>'Password may not contain spaces'
Thus the bug is fixed, change bug status to VERIFIED.

Comment 9 haiyang,dong 2012-12-27 03:11:41 UTC
so follow steps of comment 8 to re-test on version
rhev-hypervisor6-6.4-20121212.1.el6, bug was fixed on it.

Comment 13 errata-xmlrpc 2013-02-28 16:38:36 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.

http://rhn.redhat.com/errata/RHBA-2013-0556.html


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