Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 507816 - net-analyzer/metasploit-9999 - msfconsole: /usr/lib64/ruby/gems/1.9.1/gems/activemodel-4.0.4/lib/active_model/validations/format.rb:46:in `check_options_validity': The provided regular expression is using multiline anchors (^ or $), which may present a se
Summary: net-analyzer/metasploit-9999 - msfconsole: /usr/lib64/ruby/gems/1.9.1/gems/ac...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Rick Farina (Zero_Chaos)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-16 10:38 UTC by Joel
Modified: 2014-04-19 23:07 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Gemfile.lock (Gemfile.lock,1.24 KB, text/plain)
2014-04-16 15:51 UTC, Joel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joel 2014-04-16 10:38:55 UTC
Everytime I try to execute 'msfconsole' it crashes with the following error:

# msfconsole 
/usr/lib64/ruby/gems/1.9.1/gems/activemodel-4.0.4/lib/active_model/validations/format.rb:46:in `check_options_validity': The provided regular expression is using multiline anchors (^ or $), which may present a security risk. Did you mean to use \A and \z, or forgot to add the :multiline => true option? (ArgumentError)
        from /usr/lib64/ruby/gems/1.9.1/gems/activemodel-4.0.4/lib/active_model/validations/format.rb:20:in `check_validity!'
        from /usr/lib64/ruby/gems/1.9.1/gems/activemodel-4.0.4/lib/active_model/validator.rb:143:in `initialize'
        from /usr/lib64/ruby/gems/1.9.1/gems/activemodel-4.0.4/lib/active_model/validations/with.rb:87:in `new'
        from /usr/lib64/ruby/gems/1.9.1/gems/activemodel-4.0.4/lib/active_model/validations/with.rb:87:in `block in validates_with'
        from /usr/lib64/ruby/gems/1.9.1/gems/activemodel-4.0.4/lib/active_model/validations/with.rb:86:in `each'
        from /usr/lib64/ruby/gems/1.9.1/gems/activemodel-4.0.4/lib/active_model/validations/with.rb:86:in `validates_with'
        from /usr/lib64/ruby/gems/1.9.1/gems/activemodel-4.0.4/lib/active_model/validations/validates.rb:119:in `block in validates'
        from /usr/lib64/ruby/gems/1.9.1/gems/activemodel-4.0.4/lib/active_model/validations/validates.rb:109:in `each'
        from /usr/lib64/ruby/gems/1.9.1/gems/activemodel-4.0.4/lib/active_model/validations/validates.rb:109:in `validates'
        from /usr/lib64/ruby/gems/1.9.1/gems/metasploit_data_models-0.17.0/app/models/mdm/tag.rb:30:in `<class:Tag>'
        from /usr/lib64/ruby/gems/1.9.1/gems/metasploit_data_models-0.17.0/app/models/mdm/tag.rb:1:in `<top (required)>'
        from /usr/lib64/ruby/gems/1.9.1/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require'
        from /usr/lib64/ruby/gems/1.9.1/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `block in require'
        from /usr/lib64/ruby/gems/1.9.1/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:214:in `load_dependency'
        from /usr/lib64/ruby/gems/1.9.1/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require'
        from /usr/lib64/ruby/gems/1.9.1/gems/metasploit_data_models-0.17.0/lib/metasploit_data_models/models.rb:17:in `block in require_models'
        from /usr/lib64/ruby/gems/1.9.1/gems/metasploit_data_models-0.17.0/lib/metasploit_data_models/models.rb:16:in `glob'
        from /usr/lib64/ruby/gems/1.9.1/gems/metasploit_data_models-0.17.0/lib/metasploit_data_models/models.rb:16:in `require_models'
        from /usr/lib64/metasploit9999/lib/msf/core/db_manager.rb:106:in `initialize_database_support'
        from /usr/lib64/metasploit9999/lib/msf/core/db_manager.rb:78:in `initialize'
        from /usr/lib64/metasploit9999/lib/msf/core/framework.rb:88:in `new'
        from /usr/lib64/metasploit9999/lib/msf/core/framework.rb:88:in `initialize'
        from /usr/lib64/metasploit9999/lib/msf/base/simple/framework.rb:73:in `new'
        from /usr/lib64/metasploit9999/lib/msf/base/simple/framework.rb:73:in `create'
        from /usr/lib64/metasploit9999/lib/msf/ui/console/driver.rb:82:in `initialize'
        from /usr/bin/msfconsole:148:in `new'
        from /usr/bin/msfconsole:148:in `<main>'


Reproducible: Always
Comment 1 Rick Farina (Zero_Chaos) gentoo-dev 2014-04-16 15:33:42 UTC
Do you have activerecord:3.2 installed in addition to 4.0? Or do you just have 4.0?
Comment 2 Joel 2014-04-16 15:41:03 UTC
Hi, I've both of them:

 * Searching for activerecord ...
[IP-] [  ] dev-ruby/activerecord-3.2.17:3.2
[IP-] [  ] dev-ruby/activerecord-4.0.4:4.0
Comment 3 Rick Farina (Zero_Chaos) gentoo-dev 2014-04-16 15:48:51 UTC
Please try the following:

rm /usr/lib64/metasploit9999/Gemfile.lock

rerun msfconsole

If it still fails, please attach Gemfile.lock.
Comment 4 Joel 2014-04-16 15:51:17 UTC
Created attachment 375092 [details]
Gemfile.lock
Comment 5 Joel 2014-04-16 15:51:52 UTC
I removed gemfile.lock, but the same result happened. I'm attaching the gemfile.lock as requested.
Comment 6 Rick Farina (Zero_Chaos) gentoo-dev 2014-04-16 16:06:14 UTC
I'm currently discussing this with upstream.  They are discussing if they want to fix their deps, or fix support for active*:4.0.

In the meantime, for a working system you can simply unmerge active{record,support,model}:4.0 and use :3.2
Comment 7 Rick Farina (Zero_Chaos) gentoo-dev 2014-04-17 18:10:27 UTC
I got tired of waiting on upstream so I just went ahead and fixed it in the ebuild with sed.  Hopefully this fixes your problem, please report back success or failure.

+  17 Apr 2014; Rick Farina <zerochaos@gentoo.org> +metasploit-4.9.2-r1.ebuild,
+  -metasploit-4.4.0-r1.ebuild, -metasploit-4.8.2-r1.ebuild,
+  -metasploit-4.9.2.ebuild, metadata.xml, metasploit-9999.ebuild:
+  cleanup old, fix bug #507816 by pinning deps properly in Gemfile

4.9.2-r1 and 9999 have the fix but it may take a few minutes for the mirrors to sync it.
Comment 8 Joel 2014-04-18 14:15:25 UTC
Hi, 
now emerge fails because it doesn't find bcrypt-ruby-2.1.7, although it's installed. There's a bug filled for this: 508014. Could the changes made to the ebuild be responsible of that? Thanks.
Comment 9 Rick Farina (Zero_Chaos) gentoo-dev 2014-04-18 19:21:19 UTC
(In reply to Joel from comment #8)
> Hi, 
> now emerge fails because it doesn't find bcrypt-ruby-2.1.7, although it's
> installed. There's a bug filled for this: 508014. Could the changes made to
> the ebuild be responsible of that? Thanks.

No, this is a different bug, hopefully one I can fix ;-)
Comment 10 Joel 2014-04-19 23:07:09 UTC
Everything works OK now. Thank you.