Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
DescriptionCedric Buissart
2019-10-14 12:12:43 UTC
Description of problem:
nmap seems to be build without SSH2 support. However, the NSE & LUA scripts are included in the RPM. This may lead to confusion.
How reproducible: 100%
Steps to Reproduce:
1. check nmap status
[root@rhel8-1 nmap]# nmap -V | grep without
Compiled without: libssh2 libz
2. check ssh2 related files included in the RPM
[root@rhel8-1 nmap]# rpm -ql nmap | grep ssh
/usr/share/nmap/nselib/libssh2-utility.lua
/usr/share/nmap/nselib/libssh2.luadoc
/usr/share/nmap/nselib/ssh1.lua
/usr/share/nmap/nselib/ssh2.lua
/usr/share/nmap/scripts/ssh-auth-methods.nse
/usr/share/nmap/scripts/ssh-brute.nse
/usr/share/nmap/scripts/ssh-hostkey.nse
/usr/share/nmap/scripts/ssh-publickey-acceptance.nse
/usr/share/nmap/scripts/ssh-run.nse
/usr/share/nmap/scripts/ssh2-enum-algos.nse
/usr/share/nmap/scripts/sshv1.nse
3. Try to call the ssh-* scripts
$ nmap -vvv -d -sS -p2200 -sV --version-light -sC --script=ssh-publickey-acceptance,ssh-auth-methods -oA ssh-test localhost
Actual results:
```
Starting Nmap 7.70 ( https://nmap.org ) at 2019-10-14 05:23 EDT
[...]
NSE: Using Lua 5.3.
NSE: Arguments from CLI:
NSE: module 'libssh2' not found:
NSE failed to find nselib/libssh2.lua in search paths.
no field package.preload['libssh2']
no file '/usr/local/share/lua/5.3/libssh2.lua'
no file '/usr/local/share/lua/5.3/libssh2/init.lua'
no file '/usr/local/lib/lua/5.3/libssh2.lua'
no file '/usr/local/lib/lua/5.3/libssh2/init.lua'
no file './libssh2.lua'
no file './libssh2/init.lua'
no file '/usr/local/lib/lua/5.3/libssh2.so'
no file '/usr/local/lib/lua/5.3/loadall.so'
no file './libssh2.so'
stack traceback:
/usr/bin/../share/nmap/nse_main.lua:293: in function 'stdnse.silent_require'
/usr/bin/../share/nmap/nselib/libssh2-utility.lua:14: in main chunk
[C]: in function 'require'
/usr/bin/../share/nmap/scripts/ssh-auth-methods.nse:3: in function </usr/bin/../share/nmap/scripts/ssh-auth-methods.nse:1>
NSE: Failed to load '/usr/bin/../share/nmap/scripts/ssh-auth-methods.nse'.
NSE: module 'libssh2' not found:
NSE failed to find nselib/libssh2.lua in search paths.
no field package.preload['libssh2']
no file '/usr/local/share/lua/5.3/libssh2.lua'
no file '/usr/local/share/lua/5.3/libssh2/init.lua'
no file '/usr/local/lib/lua/5.3/libssh2.lua'
no file '/usr/local/lib/lua/5.3/libssh2/init.lua'
no file './libssh2.lua'
no file './libssh2/init.lua'
no file '/usr/local/lib/lua/5.3/libssh2.so'
no file '/usr/local/lib/lua/5.3/loadall.so'
no file './libssh2.so'
stack traceback:
/usr/bin/../share/nmap/nse_main.lua:293: in function 'stdnse.silent_require'
/usr/bin/../share/nmap/nselib/libssh2-utility.lua:14: in main chunk
[C]: in function 'require'
/usr/bin/../share/nmap/scripts/ssh-publickey-acceptance.nse:9: in function </usr/bin/../share/nmap/scripts/ssh-publickey-acceptance.nse:1>
```
Expected results:
=> The scripts requiring the missing libssh2 module should not be included in the RPM, since they can not be used.
Additional info:
libssh2-utility requires libssh2, which is omitted in the build. Thus all scripts requiring libssh2-utility will fail.
I think the following files can be removed :
ssh-auth-methods.nse
ssh-brute.nse
ssh-publickey-acceptance.nse
ssh-run.nse
libssh2-utility.lua
Comment 1RHEL Program Management
2020-03-27 13:22:30 UTC
Development Management has reviewed and declined this request. You may appeal this decision by reopening this request.