Bug 574035 - snmpget return 0 return code on short passphrase error
Summary: snmpget return 0 return code on short passphrase error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: net-snmp
Version: 5.5
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Jan Safranek
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks: 574061
TreeView+ depends on / blocked
 
Reported: 2010-03-16 13:04 UTC by Jan Friesse
Modified: 2016-04-26 13:45 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 574061 668390 (view as bug list)
Environment:
Last Closed: 2011-07-21 09:10:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1076 0 normal SHIPPED_LIVE net-snmp bug fix and enhancement update 2011-07-21 09:07:58 UTC

Description Jan Friesse 2010-03-16 13:04:55 UTC
Description of problem:
snmpget/snmpwalk/... returns error code 0 (= success) on passphrase error (error is correctly written to stderr). snmpget/... should return error code different than zero in such situation.

This is major problem. Minor problem is, that snmpcmd SHOULD ignore settings not applicable to selected version of SNMP (like -A should be ignored in case of -v 1/2c)

How reproducible:
Run snmpget with password shorter than 8 characters.

[honza@daemon ~]$ /usr/bin/snmpget -v '1' -c 'private' -A 'x' -u 'x' '127.0.0.1:161'  1.2.3
Error: passphrase chosen is below the length requirements of the USM (min=8).
/usr/bin/snmpget:  (The supplied password length is too short.)
Error generating a key (Ku) from the supplied authentication pass phrase.
[honza@daemon ~]$ echo $?
0


Steps to Reproduce:
1. /usr/bin/snmpget -v '1' -c 'private' -A 'x' -u 'x' '127.0.0.1:161'  1.2.3
2. echo $?
  
Actual results:
0


Expected results:
Value different from zero

Comment 1 Jan Safranek 2010-04-26 13:40:51 UTC
Oops, wrong bug, moving back to ASSIGNED.

Comment 9 errata-xmlrpc 2011-07-21 09:10:16 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1076.html

Comment 10 errata-xmlrpc 2011-07-21 12:21:41 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1076.html


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