CVE-2011-2705
The SecureRandom.random_bytes function in lib/securerandom.rb in Ruby before 1.8.7-p352 and 1.9.x before 1.9.2-p290 relies on PID values for initialization, which makes it easier for context-dependent attackers to predict the result string by leveraging knowledge of random strings obtained in an earlier process with the same PID.
What to do
Fixed builds are available from Red Hat: see the table below for the fixed version per release.
Red Hat has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Red Hat Enterprise Linux 6 | ruby | Fixed | 0:1.8.7.352-3.el6 | RHSA-2011:1581 |
| Red Hat Enterprise Linux 6 | ruby-devel | Fixed | 0:1.8.7.352-3.el6 | RHSA-2011:1581 |
| Red Hat Enterprise Linux 6 | ruby-docs | Fixed | 0:1.8.7.352-3.el6 | RHSA-2011:1581 |
| Red Hat Enterprise Linux 6 | ruby-irb | Fixed | 0:1.8.7.352-3.el6 | RHSA-2011:1581 |
| Red Hat Enterprise Linux 6 | ruby-libs | Fixed | 0:1.8.7.352-3.el6 | RHSA-2011:1581 |
| Red Hat Enterprise Linux 6 | ruby-rdoc | Fixed | 0:1.8.7.352-3.el6 | RHSA-2011:1581 |
| Red Hat Enterprise Linux 6 | ruby-ri | Fixed | 0:1.8.7.352-3.el6 | RHSA-2011:1581 |
| Red Hat Enterprise Linux 6 | ruby-static | Fixed | 0:1.8.7.352-3.el6 | RHSA-2011:1581 |
| Red Hat Enterprise Linux 6 | ruby-tcltk | Fixed | 0:1.8.7.352-3.el6 | RHSA-2011:1581 |
| Red Hat Enterprise Linux 5 | ruby | Fix pending Affected | ||
| Red Hat Enterprise Linux 4 | ruby | Fix pending Affected |
What the vendor says
As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
Vendor advisories:
- http://www.redhat.com/support/errata/RHSA-2011-1581.html (vendor-advisory)
- http://lists.fedoraproject.org/pipermail/package-announce/2011-July/063062.html (vendor-advisory)
- http://lists.fedoraproject.org/pipermail/package-announce/2011-July/063071.html (vendor-advisory)
References
- http://www.openwall.com/lists/oss-security/2011/07/12/14
- http://www.ruby-lang.org/en/news/2011/07/02/ruby-1-8-7-p352-released/
- https://bugzilla.redhat.com/show_bug.cgi?id=722415
- http://www.openwall.com/lists/oss-security/2011/07/20/16
- http://www.redhat.com/support/errata/RHSA-2011-1581.html
- http://www.ruby-lang.org/en/news/2011/07/15/ruby-1-9-2-p290-is-released/
- http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=32050
- http://svn.ruby-lang.org/repos/ruby/tags/v1_8_7_352/ChangeLog
- http://lists.fedoraproject.org/pipermail/package-announce/2011-July/063062.html
- http://svn.ruby-lang.org/repos/ruby/tags/v1_9_2_290/ChangeLog
- http://www.openwall.com/lists/oss-security/2011/07/20/1
- http://redmine.ruby-lang.org/issues/4579
- http://www.openwall.com/lists/oss-security/2011/07/11/1
- http://www.securityfocus.com/bid/49015
- http://lists.fedoraproject.org/pipermail/package-announce/2011-July/063071.html
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.