| RubySec Summary of CVE-2013-6393 aka "you're probably vulnerable" | postmodern.mod3 | 05/02/14 16:51 | Recently,
it was disclosed that libyaml <= 0.1.4 is vulnerable to a
heap overflow [1]. libyaml is used by Ruby's Psych YAML parser
[2], which ships with Ruby >= 1.9.2 and was made the default
YAML parser in Ruby 1.9.3. Any
software that uses an unpatched version of libyaml <= 0.1.4
is vulnerable. This includes, but is not limited to, the Psych
YAML parser, which is included in Ruby >= 1.9.2. The vulnerability is patched in libyaml version 0.1.5. Debian, RedHat, Ubuntu and Fedora have released their own patched versions of libyaml 0.1.4, so Psych::LIBYAML_VERSION may still be 0.1.4 on a patched system. See below for distribution-specific information: ###
RVM ### rbenv/ruby-build
### Compiled from Source (Ruby >= 2.0.0)
You need to do three things: 1. Upgrade libyaml 2. Upgrade RVM/rbenv/ruby-build and/or recompile rubies 3. Restart Ruby processes ###
Upgrade libyaml #### Debian/Ubuntu Debian and Ubuntu users can update libyaml via apt-get: apt-get update apt-get install libyaml-0-2 ####
Fedora #### OSX/Homebrew
brew upgrade libyaml Users
who previously installed libyaml from source, should install
libyaml 0.1.5: ### Recompile Rubies Depending on how your rubies were installed, you may need to perform steps to upgrade your ruby version manager script and/or rebuild your rubies. #### Compiled from Source (Ruby >= 2.0.0) Users who installed Ruby >= 2.0.0 from source, but did not explicitly install libyaml beforehand, must install an updated version of libyaml and re-compile Ruby. This will force Psych to use the system's libyaml instead of its vendored libyaml-0.1.4. This measure will be necessary only until updated versions of ruby 2.0 and 2.1 have been released. #### RVM
rvm get stable #### rbenv/ruby-build
If ruby-build was installed from homebrew: brew update brew upgrade ruby-build If ruby-build was installed via git: cd ~/.rbenv/plugins/ruby-build git pull To re-install all Rubies installed by rbenv:
for ruby in ~/.rbenv/versions/*; do rbenv uninstall $ruby rbenv install $ruby done This will force ruby-build to re-compile all previously installed Rubies against libyaml 0.1.5. ### Restart Ruby processes In order for the Ruby processes to load the updated libyaml, they must be restarted. ## Credits The vulnerability was originally discovered by Florian Weimer of the Red Hat Product Security Team. Thanks to Michal Papis for helping to get the vulnerability fixed in upstream. ## About Us RubySec (http://rubysec.com) is an informal group of Ruby developers and security professionals interested in providing security resources to the Ruby community. We also maintain ruby-advisory-db (https://github.com/rubysec/ruby-advisory-db#readme) and bundler-audit (https://github.com/rubysec/bundler-audit#readme).
[6]: https://groups.google.com/forum/#!topic/rubyonrails-security/KtmwSbEpzrU [7]: https://github.com/wayneeseguin/rvm/issues/2594 [8]: https://github.com/sstephenson/ruby-build/issues/499 [9]: https://bugs.ruby-lang.org/issues/7375 [10]: https://github.com/sstephenson/ruby-build/releases/tag/v20140204 -- Blog: http://postmodern.github.com/ GitHub: https://github.com/postmodern Twitter: @postmodern_mod3 PGP: 0xB9515E77 |
| Re: RubySec Summary of CVE-2013-6393 aka "you're probably vulnerable" | postmodern.mod3 | 05/02/14 17:41 | A minor correction to the snippet for re-installing all rbenv rubies. It should actually be:
rbenv uninstall ${ruby##*/} rbenv install ${ruby##*/} done |
| Re: RubySec Summary of CVE-2013-6393 aka "you're probably vulnerable" | Jean-Philippe Doyle | 06/02/14 13:23 | RVM rubies should be reinstall with disable binary option since latest binary are not patched yet : rvm reinstall --disable-binary` |
| Re: RubySec Summary of CVE-2013-6393 aka "you're probably vulnerable" | Tyler DeWitt | 03/04/14 14:55 | mpapis (RVM maintainer) has noted the issue with simply updating RVM and has a WIP for it. https://github.com/wayneeseguin/rvm/issues/2753. Once that issue is resolved, he thinks the instructions listed here will be correct (a simple `rvm get stable` will use the correct library).
|