Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 647922 - <dev-ruby/rubygems-2.7.6: multiple vulnerabilities
Summary: <dev-ruby/rubygems-2.7.6: multiple vulnerabilities
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Security
URL: http://blog.rubygems.org/2018/02/15/2...
Whiteboard: B4 [noglsa]
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-17 07:39 UTC by Hans de Graaff
Modified: 2018-04-22 21:08 UTC (History)
0 users

See Also:
Package list:
dev-ruby/rubygems-2.7.6
Runtime testing required: ---
stable-bot: sanity-check+


Attachments
rubygems-2.7.6 build log (build.log,2.16 KB, text/x-log)
2018-02-19 15:11 UTC, Niels Hamaker
no flags Details
emerge --infor =rubygems-2.7.6 output (emerge_info,17.13 KB, text/plain)
2018-02-19 15:12 UTC, Niels Hamaker
no flags Details
emerge rubygems output (emerge_output,3.16 KB, text/plain)
2018-02-19 15:12 UTC, Niels Hamaker
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hans de Graaff gentoo-dev Security 2018-02-17 07:39:25 UTC
- Prevent path traversal when writing to a symlinked basedir outside of the root. 
- Fix possible Unsafe Object Deserialization Vulnerability in gem owner.
- Strictly interpret octal fields in tar headers.
- Raise a security error when there are duplicate files in a package.
- Enforce URL validation on spec homepage attribute.
- Mitigate XSS vulnerability in homepage attribute when displayed via gem server. 
- Prevent Path Traversal issue during gem installation.
Comment 1 Hans de Graaff gentoo-dev Security 2018-02-17 07:40:44 UTC
Fixed version is in the repo, but I'd like to see a few days of testing before starting the stable process.
Comment 2 Niels Hamaker 2018-02-19 11:12:30 UTC
I'm currently getting errors installing rubygems-2.7.6, but this was also removing the ruby23 use flag:
 * Package:    dev-ruby/rubygems-2.7.6
 * Repository: gentoo
 * Maintainer: ruby@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux ruby_targets_ruby24 userland_GNU
 * FEATURES:   preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking rubygems-2.7.6.tgz to /var/tmp/portage/dev-ruby/rubygems-2.7.6/work/all
>>> Source unpacked in /var/tmp/portage/dev-ruby/rubygems-2.7.6/work
>>> Preparing source in /var/tmp/portage/dev-ruby/rubygems-2.7.6/work ...
 * Running prepare phase for all ...
 * Running prepare phase for all ...
 * Adjusting to prefix /
 *   operating_system.rb ...
 [ ok ]
 * Running source copy phase for ruby24 ...
cp: cannot create hard link 'ruby24/rubygems-2.7.6/test/rubygems/test_gem_installer.rb' to 'all/rubygems-2.7.6/test/rubygems/test_gem_installer.rb': File exists
 * ERROR: dev-ruby/rubygems-2.7.6::gentoo failed (prepare phase):
 *   Unable to copy ruby24 environment
 * 
 * Call stack:
 *     ebuild.sh, line  124:  Called src_prepare
 *   environment, line 4254:  Called ruby-ng_src_prepare
 *   environment, line 4073:  Called _ruby_each_implementation '_ruby_source_copy'
 *   environment, line  404:  Called _ruby_invoke_environment 'ruby24' '_ruby_source_copy'
 *   environment, line  529:  Called _ruby_source_copy
 *   environment, line  535:  Called die
 * The specific snippet of code:
 *       cp -prlP all ${_ruby_implementation} || die "Unable to copy ${_ruby_implementation} environment"
 * 

2.6.14 has just now installed fine.
Maybe this is a red herring, but given the security vulnerabilities I thought this might be worth sharing with you quickly. Once ruby23 is gone from my system I can see if I can install 2.7.6 normally or if the problem persists.
Comment 3 Niels Hamaker 2018-02-19 15:11:33 UTC
Created attachment 520110 [details]
rubygems-2.7.6 build log
Comment 4 Niels Hamaker 2018-02-19 15:12:03 UTC
Created attachment 520112 [details]
emerge --infor =rubygems-2.7.6 output
Comment 5 Niels Hamaker 2018-02-19 15:12:51 UTC
Created attachment 520114 [details]
emerge rubygems output
Comment 6 Niels Hamaker 2018-02-19 15:14:04 UTC
This problem still persists in my system, after running updates etc. Should I create a separate bugreport for this, or is it ok for this to live here?
Comment 7 Hans de Graaff gentoo-dev Security 2018-02-19 18:42:31 UTC
(In reply to Niels Hamaker from comment #6)
> This problem still persists in my system, after running updates etc. Should
> I create a separate bugreport for this, or is it ok for this to live here?

This should have been a separate bugreport from the start, so please do.
Comment 8 Christopher Díaz Riveros (RETIRED) gentoo-dev Security 2018-03-14 22:34:14 UTC
(In reply to Hans de Graaff from comment #1)
> Fixed version is in the repo, but I'd like to see a few days of testing
> before starting the stable process.

Hi Hans, please call for stabilization when appropriate. Btw, is there a list of CVEs assigned to those vulnerabilities? I may help to diagnose the severity level.

Thank you
Comment 9 Hans de Graaff gentoo-dev Security 2018-03-29 06:12:25 UTC
The reported issues turned out to be btrfs regressions in linux 4.15.

Upstream does not list any CVE indentifiers.
Comment 10 Hans de Graaff gentoo-dev Security 2018-03-29 06:15:04 UTC
Please test and mark stable.
Comment 11 Thomas Deutschmann (RETIRED) gentoo-dev 2018-03-29 14:53:38 UTC
x86 stable
Comment 12 Thomas Deutschmann (RETIRED) gentoo-dev 2018-03-29 14:55:47 UTC
x86 stable
Comment 13 Larry the Git Cow gentoo-dev 2018-03-30 00:36:37 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d6aaf8632c0d3f655982a5f0ad989d55e8d0935

commit 0d6aaf8632c0d3f655982a5f0ad989d55e8d0935
Author:     Aaron Bauman <bman@gentoo.org>
AuthorDate: 2018-03-30 00:30:00 +0000
Commit:     Aaron Bauman <bman@gentoo.org>
CommitDate: 2018-03-30 00:30:00 +0000

    dev-ruby/rubygems: amd64 stable
    
    Bug: https://bugs.gentoo.org/647922
    Package-Manager: Portage-2.3.26, Repoman-2.3.7

 dev-ruby/rubygems/rubygems-2.7.6.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)}
Comment 14 Sergei Trofimovich (RETIRED) gentoo-dev 2018-03-30 12:08:17 UTC
ia64 stable
Comment 15 Larry the Git Cow gentoo-dev 2018-03-31 10:04:52 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a93392ee917d49e3fe9812628cc8e2a0bc5e1ca7

commit a93392ee917d49e3fe9812628cc8e2a0bc5e1ca7
Author:     Rolf Eike Beer <eike@sf-mail.de>
AuthorDate: 2018-03-31 08:30:34 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2018-03-31 10:04:42 +0000

    dev-ruby/rubygems: stable 2.7.6 for sparc
    
    Bug: https://bugs.gentoo.org/647922
    Package-Manager: Portage-2.3.24, Repoman-2.3.6
    RepoMan-Options: --include-arches="sparc"

 dev-ruby/rubygems/rubygems-2.7.6.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)}
Comment 16 Tobias Klausmann (RETIRED) gentoo-dev 2018-03-31 15:39:41 UTC
Stable on alpha.
Comment 17 Sergei Trofimovich (RETIRED) gentoo-dev 2018-04-01 14:19:32 UTC
ppc64 stable
Comment 18 Markus Meier gentoo-dev 2018-04-08 10:53:13 UTC
arm stable
Comment 19 Larry the Git Cow gentoo-dev 2018-04-20 06:57:31 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3c9ae1b6a56c21c37e55d2ab94dfaa1d17d399f

commit e3c9ae1b6a56c21c37e55d2ab94dfaa1d17d399f
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2018-04-20 06:57:13 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2018-04-20 06:57:13 +0000

    dev-ruby/rubygems: stable 2.7.6 for ppc, bug #647922
    
    Bug: https://bugs.gentoo.org/647922
    Package-Manager: Portage-2.3.28, Repoman-2.3.9
    RepoMan-Options: --include-arches="ppc"

 dev-ruby/rubygems/rubygems-2.7.6.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)}
Comment 20 Matt Turner gentoo-dev 2018-04-22 19:18:03 UTC
hppa stable
Comment 21 Hans de Graaff gentoo-dev Security 2018-04-22 19:22:13 UTC
Vulnerable version have been removed.
Comment 22 Aaron Bauman (RETIRED) gentoo-dev 2018-04-22 21:08:18 UTC
(In reply to Hans de Graaff from comment #21)
> Vulnerable version have been removed.

GLSA Vote: No

Thanks, Hans!