Skip to content
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

Run Ubuntu 22.04 in test matrix #234

Merged

Conversation

adfoster-r7
Copy link
Contributor

@adfoster-r7 adfoster-r7 commented Jul 19, 2022

Relates to rapid7/metasploit-framework#16818

Let's run Ubuntu 22.04 in our test matrix, to catch any OpenSSL v3 regression issues

Behind the scenes this depended on two changes to dependencies:

Currently not a blocker to this particular PR - but additional changes to RubyNTLM will be required. Such as:

Verification

  • Code review
  • Verify CI passes

@adfoster-r7 adfoster-r7 force-pushed the run-ubuntu-22.04-in-test-matrix branch 5 times, most recently from b4b26db to e0dac97 Compare July 19, 2022 18:03
Gemfile Outdated
@@ -8,8 +8,6 @@ group :development do
end

group :test do
# simplecov test formatter and uploader for Coveralls.io
gem "coveralls", '~>0.8.23', :require => false
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been dead since 2020, and the endpoint raises SSL exceptions now - potentially due to not providing an auth token.

@adfoster-r7 adfoster-r7 force-pushed the run-ubuntu-22.04-in-test-matrix branch 6 times, most recently from f2c36bc to bc4b12b Compare July 20, 2022 19:52
lib/ruby_smb/signing.rb Outdated Show resolved Hide resolved
@adfoster-r7 adfoster-r7 force-pushed the run-ubuntu-22.04-in-test-matrix branch from bc4b12b to ff7b521 Compare July 20, 2022 19:54
Gemfile Outdated Show resolved Hide resolved
@@ -12,8 +12,8 @@ module Signing
# @param [RubySMB::GenericPacket] packet The packet to sign.
# @return [RubySMB::GenericPacket] the signed packet
def smb1_sign(packet)
packet = Signing::smb1_sign(packet, @session_key, @sequence_counter)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests were mocking the session_key accessor, but not the @session_key instance variable. As a result, OpenSSL 3 was throwing validation errors that '' was an invalid key.

# Enable legacy providers
ENV['OPENSSL_CONF'] = File.expand_path(
File.join(File.dirname(__FILE__), 'support', 'openssl.conf')
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenSSL 3 no longer loads old cyphers by default. This allows the tests to pass. Metasploit-framework will have this file loaded at runtime.

Unfortunately it means direct users of RubySMB will need a similar configuration change. Or we will need to wait for a solution similar to WinRb/rubyntlm#53 to land

@adfoster-r7 adfoster-r7 force-pushed the run-ubuntu-22.04-in-test-matrix branch from ff7b521 to 46fcbdb Compare August 1, 2022 09:58
@adfoster-r7 adfoster-r7 merged commit 3a23257 into rapid7:master Aug 3, 2022
@adfoster-r7 adfoster-r7 deleted the run-ubuntu-22.04-in-test-matrix branch August 3, 2022 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants