Bug 2127424 (CVE-2022-40307) - CVE-2022-40307 kernel: use-after-free in efi_capsule_write in capsule-loader.c
Summary: CVE-2022-40307 kernel: use-after-free in efi_capsule_write in capsule-loader.c
Keywords:
Status: CLOSED NOTABUG
Alias: CVE-2022-40307
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: 2127425
Blocks: 2125606
TreeView+ depends on / blocked
 
Reported: 2022-09-16 09:52 UTC by Mauro Matteo Cascella
Modified: 2022-11-27 13:25 UTC (History)
51 users (show)

Fixed In Version: kernel 6.0-rc5
Doc Type: If docs needed, set a value
Doc Text:
A race condition in the Linux kernel's EFI capsule loader driver was found in the way it handled write and flush operations on the device node of the EFI capsule. A local user could potentially use this flaw to crash the system.
Clone Of:
Environment:
Last Closed: 2022-11-27 13:25:28 UTC
Embargoed:


Attachments (Terms of Use)

Description Mauro Matteo Cascella 2022-09-16 09:52:30 UTC
A race condition may occur if the user calls close() on another thread during a write() operation on the device node of the efi capsule. This is a race condition that occurs between the efi_capsule_write() and efi_capsule_flush() functions of efi_capsule_fops, which ultimately results in UAF.

Upstream commit:
https://github.com/torvalds/linux/commit/9cb636b5f6a8cc6d1b50809ec8f8d33ae0c84c95

Comment 1 Mauro Matteo Cascella 2022-09-16 09:52:58 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2127425]

Comment 4 Justin M. Forbes 2022-09-20 14:18:38 UTC
This was fixed for Fedora with the 5.19.9 stable kernel updates.

Comment 5 Product Security DevOps Team 2022-11-27 13:25:24 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2022-40307


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