Bug 1900933 (CVE-2020-27786)

Summary: CVE-2020-27786 kernel: use-after-free in kernel midi subsystem
Product: [Other] Security Response Reporter: Wade Mealing <wmealing>
Component: vulnerabilityAssignee: Nobody <nobody>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acaringi, adscvr, airlied, bhu, blc, bmasney, bskeggs, dvlasenk, hdegoede, hkrzesin, iboverma, itamar, jarodwilson, jeremy, jforbes, jkysela, jlelli, jonathan, josef, jross, jshortt, jstancek, jwboyer, kcarcia, kernel-maint, kernel-mgr, lgoncalv, linville, masami256, mchehab, mjg59, mlangsdo, nmurray, ptalbert, qzhao, rt-maint, rvrbovsk, steved, walters, williams
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel 5.7-rc6 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the Linux kernel’s implementation of MIDI, where an attacker with a local account and the permissions to issue ioctl commands to midi devices could trigger a use-after-free issue. A write to this specific memory while freed and before use causes the flow of execution to change and possibly allow for memory corruption or privilege escalation. The highest threat from this vulnerability is to confidentiality, integrity, as well as system availability.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-11 08:47:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1869536, 1900948, 1900949, 1900950, 1900951, 1900952, 1900953, 1900954, 1900955, 1900956, 1900957, 1900958, 1902539, 1902540, 1902541, 1902542, 1903894, 1914738    
Bug Blocks: 1899667, 1936789    

Description Wade Mealing 2020-11-24 03:00:30 UTC
A flaw was found in the Linux kernels implementation of MIDI, where an attacker with a local account and the permissions to issue an ioctl commands to midi devices, could trigger a use-after-free.  A write to this specific memory while freed and before use could cause the flow of execution to change and possibly allow for memory corruption or privilege escalation.

This would only affect systems that have attached local MIDI hardware with the midi kernel modules loaded.

Comment 4 Wade Mealing 2020-11-24 04:47:03 UTC
Mitigation:


As the midi module will be auto-loaded when required, its use can be disabled by preventing the module from loading with the following instructions:

# echo "install snd-rawmidi /bin/true" >> /etc/modprobe.d/disable-snd-rawmidi.conf

The system will need to be restarted if the snd-rawmidi modules are loaded. In most circumstances, the CIFS kernel modules will be unable to be unloaded while any midi / sound devices are active and the protocol is in use.

If the system requires this module to work correctly, this mitigation may not be suitable.

If you need further assistance, see KCS article https://access.redhat.com/solutions/41278 or contact Red Hat Global Support Services.

Comment 8 Wade Mealing 2020-12-03 03:49:27 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1903894]

Comment 9 Justin M. Forbes 2020-12-03 13:39:59 UTC
This was fixed for Fedora with the 5.6.14 stable kernel updates.

Comment 11 errata-xmlrpc 2021-05-18 13:20:32 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2021:1578 https://access.redhat.com/errata/RHSA-2021:1578

Comment 12 errata-xmlrpc 2021-05-18 14:40:54 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2021:1739 https://access.redhat.com/errata/RHSA-2021:1739