EGI SVG Advisories

Advisory-SVG-CVE-2017-16939

Title:   EGI SVG 'ALERT' [TLP:WHITE] linux kernel 'use-after-free' flaw in XFRM
         [EGI-SVG-CVE-2017-16939]

Date:    2018-02-23
Updated: 2018-03-19 changed to [TLP:WHITE}
         2018-05-16 fixed for RedHat 7 and its derivatives


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

Vulnerability concerning Linux kernel XFRM for sites having unprivileged user
namespaces enabled.

Package : Linux Kernel
CVE ID  : CVE-2017-16939
Bug ID  :

NOTE: Only applicable for sites having unprivileged user namespaces enabled.

A vulnerability has been found in the Linux kernel concerning XFRM.
A 'use-after-free' flaw has been found which may in some circumstances lead to
privilege escalation. [R 1], [R 2], [R 3]  If unprivileged user namespaces are
used on a service to which users have shell access (e.g. worker nodes
supporting fully unprivileged creation of containers), then the vulnerability
would be exploitable there.
This is most likely to be significant in EGI in relation to usage of
Singularity [R 4].

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

RedHat 7 and its derivatives: kernel update is NOT yet available, but
vulnerable sites should urgently, as mitigation, disable at least user _net_
namespaces [R 10]:

    root@host # echo "user.max_net_namespaces = 0" > /etc/sysctl.d/90-max_net_namespaces.conf
    root@host # sysctl -p /etc/sysctl.d/90-max_net_namespaces.conf

Note: network namespaces are an essential aspect to many Docker (and other
container runtime) deployments, and the site may have to choose between safely
running unprivileged Singularity and using the default Docker configuration.
Docker can avoid network namespaces by passing the `--net=host` option to its
command line clients.

RedHat 6 and its derivatives: not affected.

For Debian or Ubuntu: fixed via the kernel update for Meltdown/Spectre
vulnerabilities.

If anyone becomes aware of any situation where this vulnerability has a
significant impact on the EGI infrastructure then please inform EGI SVG.


Component installation information
==================================

For RedHat see [R 2]  **UPDATE 2018-05-16 - fixed version available **

For Ubuntu see [R 5]

For Debian see [R 6]

For Scientific linux see [R 7] **UPDATE 2018-05-16 - fixed version available **

For CentOS see [R 9] **UPDATE 2018-05-16 - fixed version available **


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

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

URL:   https://advisories.egi.eu/Advisory-SVG-CVE-2017-16939

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 8]

Note that this has been updated and the latest version approved by the
Operations Management Board in November 2017


References
==========

[R 1] https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-16939

[R 2] https://access.redhat.com/security/cve/CVE-2017-16939

[R 3] http://seclists.org/fulldisclosure/2017/Nov/40

[R 4] http://singularity.lbl.gov/

[R 5] http://people.canonical.com/~ubuntu-security/cve/2017/CVE-2017-16939.html

[R 6] https://security-tracker.debian.org/tracker/CVE-2017-16939

[R 7] https://www.scientificlinux.org/

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

[R 9] https://lists.centos.org/pipermail/centos-announce/

[R 10] http://opensciencegrid.github.io/docs/worker-node/install-singularity/#enabling-unprivileged-mode-for-singularity

Credit
======

SVG was alerted to this vulnerability by Vincent Brillault.  Vincent Brillault,
Mischa Salle and Barbara Krasovec carried out the investigations.


Timeline
========

Yyyy-mm-dd  [EGI-SVG-CVE-2017-16939]

2017-12-06 SVG alerted to this issue by Vincent Brillault
2017-12-07 Investigation on impact on EGI carried out by Vincent Brillault,
           Mischa Salle and Barbara Krasovec
2017-12-15 Decision to send an 'alert'
2017-12-18 Alert drafted
2017-12-19 OSG sent an alert - Copied to EGI by Dave Dykstra
2018-02-23 Alert sent to EGI sites
2018-03-19 Changed to TLP:WHITE and placed on wiki
2018-05-16 Fixed version available for RH7 and its derivatives


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 8] 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



On behalf of the EGI SVG,