Skip to content

snmp: Special characters not supported in options --v3-auth-prot-password and --v3-priv-prot-password #886

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
5 of 8 tasks
michaje-gsc opened this issue May 14, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@michaje-gsc
Copy link

michaje-gsc commented May 14, 2025

This issue respects the following points:

Which variant of the Monitoring Plugins do you use?

  • .rpm/.deb package from repo.linuxfabrik.ch
  • Compiled for Linux from download.linuxfabrik.ch
  • Compiled for Windows from download.linuxfabrik.ch
  • Source Code from GitHub

Bug description

When using the following characters as part of values for --v3-auth-prot-password and/or --v3-priv-prot-password, inconsistent behaviour is observed:
#*$!&^

The following plugin output has been observed, together with a return code of 3 (Unknown):

# ./snmp --device lb-alteon-any.csv --hostname 10.9.8.7 --snmp-version 3 --timeout 2 --v3-auth-prot SHA --v3-auth-prot-password 'abc&def#ghi*jkl$mno' --v3-level authPriv --v3-priv-prot AES --v3-priv-prot-password 'pqr!stu^vwx&yz' --v3-username test
/bin/sh: line 1: yz: command not found
/bin/sh: line 1: def#ghi*jkl: command not found
Error: passphrase chosen is below the length requirements of the USM (min=8).
snmpget:  (The supplied password length is too short.)
Error generating a key (Ku) from the supplied authentication pass phrase.
#

NB: The behaviour is observed regardless the value and validity of other parameters, so this issue is very easy to reproduce.

Steps to reproduce - Plugin call

./snmp --device lb-alteon-any.csv --hostname 10.9.8.7 --snmp-version 3 --timeout 2 --v3-auth-prot SHA --v3-auth-prot-password 'abc&def#ghi*jkl$mno' --v3-level authPriv --v3-priv-prot AES --v3-priv-prot-password 'pqr!stu^vwx&yz' --v3-username test

Steps to reproduce - Data

/bin/sh: line 1: yz: command not found
/bin/sh: line 1: def#ghi*jkl: command not found
Error: passphrase chosen is below the length requirements of the USM (min=8).
snmpget:  (The supplied password length is too short.)
Error generating a key (Ku) from the supplied authentication pass phrase.

Environment

RHEL 9.5 5.14.0-503.40.1.el9_5.x86_64

Plugin Version

# ./snmp --version
snmp: v2025021501 by Linuxfabrik GmbH, Zurich/Switzerland
#
# file snmp
snmp: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=de2916dbb9553346a1b02b6d3785fc707ada8d10, for GNU/Linux 3.2.0, stripped
#

Python version

No response

List of Python modules

No response

Additional Information

No response

@michaje-gsc michaje-gsc added the bug Something isn't working label May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant