Bug 854925 - SNMP failed to auth if the password have space
SNMP failed to auth if the password have space
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ovirt-node (Show other bugs)
6.3
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Fabian Deutsch
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-06 06:19 EDT by Meng Liang
Modified: 2016-04-26 10:03 EDT (History)
13 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-28 11:38:36 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Meng Liang 2012-09-06 06:19:58 EDT
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 10:37:32 EDT
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 09:17:52 EDT
Tested as in comment #2.
Comment 8 Meng Liang 2012-10-23 04:29:53 EDT
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-26 22:11:41 EST
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 11:38:36 EST
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.