Bug 1784141 (CVE-2019-19318) - CVE-2019-19318 kernel: use-after-free in rwsem_down_write_slowpath in kernel/locking/rwsem.c
Summary: CVE-2019-19318 kernel: use-after-free in rwsem_down_write_slowpath in kernel/...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2019-19318
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1784143 1835776
Blocks: 1784142
TreeView+ depends on / blocked
 
Reported: 2019-12-16 19:10 UTC by Guilherme de Almeida Suckevicz
Modified: 2021-10-25 22:15 UTC (History)
43 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-10-25 22:15:27 UTC
Embargoed:


Attachments (Terms of Use)

Description Guilherme de Almeida Suckevicz 2019-12-16 19:10:06 UTC
A use-after-free flaw was found in rwsem_can_spin_on_owner in kernel/locking/rwsem.c in Linux kernel synchronization mechanism. This flaw can allow a local attacker with root privilege to cause a denial of service (DoS). This vulnerability could even lead to a kernel information leak problem.

For writer, the owner value is cleared on unlock. For reader, it is left intact on unlock for providing better debugging aid on crash dump and the unlock of one reader may not mean the lock is free.

As a result, the owner_on_cpu() shouldn't be used on read-owner as the task pointer value may not be valid and the task structure might have been freed. That is the case in rwsem_can_spin_on_owner() where the following use-after-free error from KASAN may appear under certain circumstances:

  BUG: KASAN: use-after-free in rwsem_down_write_slowpath
  (/home/miguel/kernel/linux/kernel/locking/rwsem.c:669
  /home/miguel/kernel/linux/kernel/locking/rwsem.c:1125)

Reference:
https://github.com/bobfuzzer/CVE/tree/master/CVE-2019-19318
https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg2056632.html

Comment 1 Guilherme de Almeida Suckevicz 2019-12-16 19:10:53 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1784143]

Comment 7 Rohit Keshri 2020-05-14 13:39:03 UTC
Mitigation:

Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

Comment 9 Justin M. Forbes 2020-10-08 19:04:54 UTC
This was fixed for Fedora with the 5.3.6 stable kernel updates.


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