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

Fix loading external modules without notes #10727

Merged
merged 1 commit into from Oct 1, 2018

Conversation

Projects
None yet
5 participants
@wvu-r7
Contributor

wvu-r7 commented Oct 1, 2018

msf5 > use auxiliary/dos/smb/smb_loris
[-] Failed to load module: auxiliary/dos/smb/smb_loris
msf5 >
[10/01/2018 12:48:01] [e(0)] core: /Users/wvu/metasploit-framework/modules/auxiliary/dos/smb/smb_loris.rb failed to load due to the following error:
Msf::Modules::Error
Failed to load module (dos/smb/smb_loris from /Users/wvu/metasploit-framework/modules/auxiliary/dos/smb/smb_loris.rb) due to Invalid module (no MetasploitModule class or module name)
[10/01/2018 12:48:02] [e(0)] core: Unable to load module /Users/wvu/metasploit-framework/modules/auxiliary/dos/smb/smb_loris.rb NoMethodError undefined method `reduce' for nil:NilClass /Users/wvu/metasploit-framework/lib/msf/core/modules/external/shim.rb:147:in `transform_notes'
/Users/wvu/metasploit-framework/lib/msf/core/modules/external/shim.rb:61:in `mod_meta_common'
/Users/wvu/metasploit-framework/lib/msf/core/modules/external/shim.rb:133:in `dos'
/Users/wvu/metasploit-framework/lib/msf/core/modules/external/shim.rb:16:in `generate'
/Users/wvu/metasploit-framework/lib/msf/core/modules/loader/executable.rb:88:in `read_module_content'
/Users/wvu/metasploit-framework/lib/msf/core/modules/loader/base.rb:126:in `load_module'
/Users/wvu/metasploit-framework/lib/msf/core/module_manager/cache.rb:91:in `block in load_cached_module'
/Users/wvu/metasploit-framework/lib/msf/core/module_manager/cache.rb:86:in `each'
/Users/wvu/metasploit-framework/lib/msf/core/module_manager/cache.rb:86:in `load_cached_module'
/Users/wvu/metasploit-framework/lib/msf/core/module_set.rb:45:in `create'
/Users/wvu/metasploit-framework/lib/msf/core/module_manager.rb:85:in `create'
/Users/wvu/metasploit-framework/lib/msf/ui/console/command_dispatcher/modules.rb:627:in `cmd_use'
/Users/wvu/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:501:in `run_command'
/Users/wvu/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:453:in `block in run_single'
/Users/wvu/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:447:in `each'
/Users/wvu/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:447:in `run_single'
/Users/wvu/metasploit-framework/lib/rex/ui/text/shell.rb:151:in `run'
/Users/wvu/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in `start'
/Users/wvu/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in `start'
./msfconsole:49:in `<main>'

Fixes #10563.

@ebleiweiss-r7

Seems reasonable to me 👍

@wvu-r7 wvu-r7 self-assigned this Oct 1, 2018

wvu-r7 added a commit to wvu-r7/metasploit-framework that referenced this pull request Oct 1, 2018

Land rapid7#10727, nil notes fix for external modules
This fixes loading of external modules without notes.

@wvu-r7 wvu-r7 merged commit 7842174 into rapid7:master Oct 1, 2018

3 checks passed

Metasploit Automation - Sanity Test Execution Successfully completed all tests.
Details
Metasploit Automation - Test Execution Successfully completed all tests.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@wvu-r7

This comment has been minimized.

Contributor

wvu-r7 commented Oct 1, 2018

Release Notes

This fixes a nil dereference in the shim layer of external module loading, allowing external modules without notes to be loaded successfully.

@wvu-r7 wvu-r7 deleted the wvu-r7:bug/notes branch Oct 1, 2018

@wvu-r7 wvu-r7 added the library label Oct 1, 2018

@busterb busterb removed the msf5 label Nov 26, 2018

msjenkins-r7 added a commit that referenced this pull request Nov 27, 2018

Land #10727, nil notes fix for external modules
This fixes loading of external modules without notes.

@gdavidson-r7 gdavidson-r7 added the rn-fix label Dec 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment