Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1561948 - (CVE-2018-8779) CVE-2018-8779 ruby: Unintentional socket creation by poisoned NULL byte in UNIXServer and UNIXSocket
CVE-2018-8779 ruby: Unintentional socket creation by poisoned NULL byte in UN...
Status: NEW
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
low Severity low
: ---
: ---
Assigned To: Red Hat Product Security
impact=low,public=20180328,reported=2...
: Security
Depends On: 1569024 1569026 1569027 1569028 1561956 1561957 1561958 1563873 1563874 1565258 1569025
Blocks: 1561954
  Show dependency treegraph
 
Reported: 2018-03-29 05:07 EDT by Adam Mariš
Modified: 2018-07-17 08:36 EDT (History)
29 users (show)

See Also:
Fixed In Version: ruby 2.2.10, ruby 2.3.7, ruby 2.4.4, ruby 2.5.1
Doc Type: If docs needed, set a value
Doc Text:
It was found that the UNIXSocket::open and UNIXServer::open ruby methods did not handle the NULL byte properly. An attacker, able to inject NULL bytes in the socket path, could possibly trigger an unspecified behavior of the ruby script.
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Adam Mariš 2018-03-29 05:07:36 EDT
UNIXServer.open accepts the path of the socket to be created at the first parameter. If the path contains NUL (\0) bytes, this method recognize that the path is completed before the NUL bytes. So, if a script accepts an external input as the argument of this method, the attacker can make the socket file in the unintentional path. And, UNIXSocket.open also accepts the path of the socket to be created at the first parameter without checking NUL bytes like UNIXServer.open. So, if a script accepts an external input as the argument of this method, the attacker can accepts the socket file in the unintentional path.

Affected versions:

Ruby 2.2 series: 2.2.9 and earlier
Ruby 2.3 series: 2.3.6 and earlier
Ruby 2.4 series: 2.4.3 and earlier
Ruby 2.5 series: 2.5.0 and earlier

External References:

https://www.ruby-lang.org/en/news/2018/03/28/poisoned-nul-byte-unixsocket-cve-2018-8779/
Comment 1 Adam Mariš 2018-03-29 05:14:42 EDT
Created ruby tracking bugs for this issue:

Affects: fedora-all [bug 1561957]
Comment 6 Cedric Buissart 2018-04-18 04:23:46 EDT
Upstream fix : 
https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62991
Comment 9 Cedric Buissart 2018-04-18 04:51:39 EDT
Mitigation:

It is possible to test for presence of the NULL byte manually prior to call the affected methods.
Comment 11 Cedric Buissart 2018-04-18 05:03:35 EDT
ruby version 1.8 does not appear to be vulnerable : the method correctly triggers an ArgumentError.
Comment 13 Eric Christensen 2018-04-19 10:18:55 EDT
Statement:

This issue did not affect the versions of ruby as shipped with Red Hat Enterprise Linux 5 and 6.

Note You need to log in before you can comment on or make changes to this bug.