EGI SVG Advisories

Advisory-SVG-CVE-2019-11328

Title:   EGI SVG 'ADVISORY' [TLP:WHITE] HIGH risk **UPDATE**  Singularity
         Vulnerability announced by the Singularity team
         [EGI-SVG-CVE-2019-11328]

Date:    2019-05-16
Updated: 2019-05-22, 2019-06-20


Affected software and risk
==========================

HIGH risk vulnerability concerning Singularity

Package : Singularity

See OSG team information and [R 5]

Actions required/recommended
============================

Sites running singularity should take action as described below, in the OSG
information, if they have not done so already.

**UPDATE 2019-06-20**

Singularity 3.2.1 is now available in EPEL [R 6], and updating to this is an
alternative to the instructions in the OSG team information below.

OSG team information
====================

Subject: OSG-SEC-2019-05-14 Vulnerability in Singularity

Dear OSG users,

Impacted:  Singularity 3.x.x, all versions
Severity:   High

The OSG Security Team wants to inform you that a high severity vulnerability
has been announced for privileged installations of all Singularity 3.x.x
versions.  A new version with a fix to the vulnerability is being prepared by
OSG.  The current primary Singularity version supported by OSG, version 2.6.1,
is not vulnerable.  OSG does however support a 3.x.x version in the
osg-upcoming yum repository and some sites have installed it.

We will send a follow up announcement when a new version is available, but
meanwhile there is a mitigation, below.

WHAT YOU SHOULD DO:
If you are using privileged Singularity 3.x.x on a RHEL7-based distribution,
while waiting for the new version either downgrade to version 2.6.1 or enable
unprivileged Singularity [1] and set

    allow setuid = no

in singularity.conf.

If you are using Singularity 3.x.x on a RHEL6-based distribution, downgrade to
version 2.6.1.

HOW IT WORKS:
A malicious user with local/network access to the host system (e.g. ssh) could
exploit this vulnerability due to insecure permissions allowing a user to edit
files within /run/singularity/instances/sing/<user>/<instance>.
The manipulation of those files can change the behavior of the starter-suid
program when instances are joined resulting in potential privilege escalation
on the host [2] [3].

REFERENCES:

[1] https://opensciencegrid.org/docs/worker-node/install-singularity/#enabling-unprivileged-singularity
[2] https://github.com/sylabs/singularity/releases/tag/v3.2.0
[3] https://cve.mitre.org/cgi-bin/cvename.cgi?name=2019-11328




TLP and URL
===========

** WHITE information - Unlimited distribution
- see https://go.egi.eu/tlp for distribution restrictions **

URL:   https://advisories.egi.eu/Advisory-SVG-CVE-2019-11328

Minor updates may be made without re-distribution to the sites


Comments
========

Comments or questions should be sent to svg-rat  at  mailman.egi.eu

If you find or become aware of another vulnerability which is relevant to EGI
you may report it by e-mail to

report-vulnerability at egi.eu

the EGI Software Vulnerability Group will take a look according to the
procedure defined in [R 4]

Note that this is undergoing revision to fully handle vulnerabilities in the
EOSC-hub era.


References
==========

[R 4] https://documents.egi.eu/public/ShowDocument?docid=3145

[R 5] https://seclists.org/oss-sec/2019/q2/112

[R 6] https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/s/


Credit
======

SVG was alerted to this vulnerability by David Dykstra from FNAL / OSG.


Timeline
========

Yyyy-mm-dd  [EGI-SVG-CVE-2019-11328]

2019-05-07 SVG alerted to this issue by David Dykstra
2019-05-07 Acknowledgement from the EGI SVG to the reporter
2019-05-15 OSG sent announcement of the vulnerability with actions to take.
2019-05-16 SVG informed sites as 'AMBER', simply providing the OSG information.
2019-05-22 Update to inform fixed version of Singularity in EPEL testing
2019-06-20 Update as fixed version of Singularity in EPEL, changed to [TLP:WHITE]

Context
=======

This advisory has been prepared as part of the effort to fulfil EGI SVG's
purpose "To minimize the risk to the EGI infrastructure arising from software
vulnerabilities"

The risk is that assessed by the group, according to the EGI SVG issue handling
procedure [R 4]  in the context of how the software is used in the EGI
infrastructure. It is the opinion of the group, we do not guarantee it to be
correct. The risk may also be higher or lower in other deployments depending on
how the software is used.

Others may re-use this information provided they:-

1) Respect the provided TLP classification

2) Credit the EGI https://www.egi.eu/ Software Vulnerability Group

Note that the SVG issue handling procedure is currently under review, to take
account of the increasing inhomogeneity of the EGI infrastructure and the
services in the EOSC-hub catalogue.

On behalf of the EGI SVG,