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 1501878 - (CVE-2017-15265) CVE-2017-15265 kernel: Use-after-free in snd_seq_ioctl_create_port()
CVE-2017-15265 kernel: Use-after-free in snd_seq_ioctl_create_port()
Status: NEW
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
impact=moderate,public=20171011,repor...
: Security
Depends On: 1503379 1509092 1501880 1503380 1503381 1503382 1503383 1503384 1503385 1503386 1503387
Blocks: 1501887
  Show dependency treegraph
 
Reported: 2017-10-13 07:59 EDT by Adam Mariš
Modified: 2018-08-28 18:23 EDT (History)
50 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
A use-after-free vulnerability was found when issuing an ioctl to a sound device. This could allow a user to exploit a race condition and create memory corruption or possibly privilege escalation.
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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:0676 None None None 2018-04-10 04:08 EDT
Red Hat Product Errata RHSA-2018:1062 None None None 2018-04-10 05:32 EDT
Red Hat Product Errata RHSA-2018:1130 None None None 2018-04-17 12:20 EDT
Red Hat Product Errata RHSA-2018:1170 None None None 2018-04-17 11:30 EDT
Red Hat Product Errata RHSA-2018:2390 None None None 2018-08-14 14:25 EDT

  None (edit)
Description Adam Mariš 2017-10-13 07:59:49 EDT
A use-after-free vulnerability was found at creating and deleting a port via an ioctl on /dev/snd/seq. The snd_seq_create_port() function creates a port object and returns its pointer, but it doesn't take a refcount and can be deleted immediately by another thread. 

Meanwhile, snd_seq_ioctl_create_port() still calls the function snd_seq_system_client_ev_port_start() with the created port object that is being deleted, which triggers use-after-free.  An attacker can race this use for memory corruption or possibly privilege escalation.

At the time of writing, the permissions on the device file required a local console user to be issue the ioctl to allow for the exploit to work correctly.  Remote users accessing the system via a shell were not granted permissions to issue an IOCTL that can trigger this condition.

References:

http://seclists.org/oss-sec/2017/q4/58

http://mailman.alsa-project.org/pipermail/alsa-devel/2017-October/126292.html

An upstream patch:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=71105998845fb012937332fe2e806d443c09e026
Comment 1 Adam Mariš 2017-10-13 08:02:15 EDT
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1501880]
Comment 4 Wade Mealing 2017-10-17 22:04:21 EDT
Statement:

This issue affects the Linux kernel packages as shipped with Red Hat
Enterprise Linux 5,6, 7, realtime and MRG-2.

Red Hat Enterprise Linux 5 has transitioned to Production phase 3.  
During the Production 3 Phase, Critical impact Security Advisories (RHSAs) 
and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released 
as they become available.

The official life cycle policy can be reviewed here:

http://redhat.com/rhel/lifecycle

Future Linux kernel updates for the respective releases may address this issue.
Comment 8 Wade Mealing 2017-10-18 00:07:07 EDT
Mitigation:

It is possible to prevent the affected code from being loaded by blacklisting the kernel module snd_seq.  Instructions relating to how to blacklist a kernel module are shown here: https://access.redhat.com/solutions/41278 

Alternatively a custom permission set can be created by udev, the correct permissions will depend on your use case.  Please contact Red Hat customer support for creating a rule set that can minimize flaw exposure.
Comment 9 Fedora Update System 2017-10-24 01:27:41 EDT
kernel-4.13.8-300.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.
Comment 10 Fedora Update System 2017-10-25 17:19:36 EDT
kernel-4.13.8-100.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.
Comment 11 Fedora Update System 2017-10-25 19:12:41 EDT
kernel-4.13.8-200.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.
Comment 13 Wade Mealing 2017-11-02 21:51:53 EDT
Got pinged on not making 5.9.z trackers, which are required for els trackers.
Comment 15 errata-xmlrpc 2018-04-10 04:08:26 EDT
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2018:0676 https://access.redhat.com/errata/RHSA-2018:0676
Comment 16 errata-xmlrpc 2018-04-10 05:32:04 EDT
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2018:1062 https://access.redhat.com/errata/RHSA-2018:1062
Comment 17 errata-xmlrpc 2018-04-17 11:29:45 EDT
This issue has been addressed in the following products:

  Red Hat Enterprise MRG 2

Via RHSA-2018:1170 https://access.redhat.com/errata/RHSA-2018:1170
Comment 18 errata-xmlrpc 2018-04-17 12:20:34 EDT
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.4 Extended Update Support

Via RHSA-2018:1130 https://access.redhat.com/errata/RHSA-2018:1130
Comment 19 errata-xmlrpc 2018-08-14 14:25:31 EDT
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6

Via RHSA-2018:2390 https://access.redhat.com/errata/RHSA-2018:2390

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