CVE & CISA-KEV Catalog

CVE-2024-43891

MEDIUM
4.7
CVSS v3
NVD

Description

In the Linux kernel, the following vulnerability has been resolved: tracing: Have format file honor EVENT_FILE_FL_FREED When eventfs was introduced, special care had to be done to coordinate the freeing of the file meta data with the files that are exposed to user space. The file meta data would have a ref count that is set when the file is created and would be decremented and freed after the last user that opened the file closed it. When the file meta data was to be freed, it would set a flag (EVENT_FILE_FL_FREED) to denote that the file is freed, and any new references made (like new opens or reads) would fail as it is marked freed. This allowed other meta data to be freed after this flag was set (under the event_mutex). All the files that were dynamically created in the events directory had a pointer to the file meta data and would call event_release() when the last reference to the user space file was closed. This would be the time that it is safe to free the file meta data. A shortcut was made for the "format" file. It's i_private would point to the "call" entry directly and not point to the file's meta data. This is because all format files are the same for the same "call", so it was thought there was no reason to differentiate them. The other files maintain state (like the "enable", "trigger", etc). But this meant if the file were to disappear, the "format" file would be unaware of it. This caused a race that could be trigger via the user_events test (that would create dynamic events and free them), and running a loop that would read the user_events format files: In one console run: # cd tools/testing/selftests/user_events # while true; do ./ftrace_test; done And in another console run: # cd /sys/kernel/tracing/ # while true; do cat events/user_events/__test_event/format; done 2>/dev/null With KASAN memory checking, it would trigger a use-after-free bug report (which was a real bug). This was because the format file was not checking the file's meta data flag "EVENT_FILE_FL_FREED", so it would access the event that the file meta data pointed to after the event was freed. After inspection, there are other locations that were found to not check the EVENT_FILE_FL_FREED flag when accessing the trace_event_file. Add a new helper function: event_file_file() that will make sure that the event_mutex is held, and will return NULL if the trace_event_file has the EVENT_FILE_FL_FREED flag set. Have the first reference of the struct file pointer use event_file_file() and check for NULL. Later uses can still use the event_file_data() helper function if the event_mutex is still held and was not released since the event_file_file() call.

How to fix

Remediation Available
linuxDebian
Fixed in:6.10.6-1CVE-2024-43891
Fixed in:6.10.6-1CVE-2024-43891
linuxUbuntu
Fixed in:6.8.0-50.51USN-7154-1
linux-awsUbuntu
Fixed in:6.8.0-1020.22USN-7154-1
linux-aws-6.8Ubuntu
Fixed in:6.8.0-1020.22~22.04.1USN-7154-1
linux-azureUbuntu
Fixed in:6.8.0-1020.23USN-7196-1
linux-azure-6.8Ubuntu
Fixed in:6.8.0-1020.23~22.04.1USN-7196-1
linux-gcpUbuntu
Fixed in:6.8.0-1019.21USN-7154-1
linux-gcp-6.8Ubuntu
Fixed in:6.8.0-1019.21~22.04.1USN-7154-1
linux-gkeUbuntu
Fixed in:6.8.0-1015.19USN-7154-1
linux-gkeopUbuntu
Fixed in:6.8.0-1002.4USN-7156-1
linux-hwe-6.8Ubuntu
Fixed in:6.8.0-50.51~22.04.1USN-7154-2
linux-ibmUbuntu
Fixed in:6.8.0-1017.17USN-7154-1
linux-image-6.8.0-1002-gkeopUbuntu
Fixed in:6.8.0-1002.4USN-7156-1
linux-image-6.8.0-1015-gkeUbuntu
Fixed in:6.8.0-1015.19USN-7154-1
linux-image-6.8.0-1016-raspiUbuntu
Fixed in:6.8.0-1016.18USN-7154-1
linux-image-6.8.0-1017-ibmUbuntu
Fixed in:6.8.0-1017.17USN-7154-1
linux-image-6.8.0-1017-oracleUbuntu
Fixed in:6.8.0-1017.18~22.04.1USN-7154-1
Fixed in:6.8.0-1017.18USN-7154-1
linux-image-6.8.0-1017-oracle-64kUbuntu
Fixed in:6.8.0-1017.18~22.04.1USN-7154-1
Fixed in:6.8.0-1017.18USN-7154-1
linux-image-6.8.0-1018-oemUbuntu
Fixed in:6.8.0-1018.18USN-7154-1
linux-image-6.8.0-1019-gcpUbuntu
Fixed in:6.8.0-1019.21~22.04.1USN-7154-1
Fixed in:6.8.0-1019.21USN-7154-1
linux-image-6.8.0-1019-nvidiaUbuntu
Fixed in:6.8.0-1019.21~22.04.1USN-7155-1
Fixed in:6.8.0-1019.21USN-7155-1
linux-image-6.8.0-1019-nvidia-64kUbuntu
Fixed in:6.8.0-1019.21~22.04.1USN-7155-1
Fixed in:6.8.0-1019.21USN-7155-1
linux-image-6.8.0-1019-nvidia-lowlatencyUbuntu
Fixed in:6.8.0-1019.21.1USN-7155-1
linux-image-6.8.0-1019-nvidia-lowlatency-64kUbuntu
Fixed in:6.8.0-1019.21.1USN-7155-1
linux-image-6.8.0-1020-awsUbuntu
Fixed in:6.8.0-1020.22~22.04.1USN-7154-1
Fixed in:6.8.0-1020.22USN-7154-1
linux-image-6.8.0-1020-azureUbuntu
Fixed in:6.8.0-1020.23~22.04.1USN-7196-1
Fixed in:6.8.0-1020.23USN-7196-1
linux-image-6.8.0-1020-azure-fdeUbuntu
Fixed in:6.8.0-1020.23~22.04.1USN-7196-1
Fixed in:6.8.0-1020.23USN-7196-1
linux-image-6.8.0-50-genericUbuntu
Fixed in:6.8.0-50.51~22.04.1USN-7154-2
Fixed in:6.8.0-50.51USN-7154-1
linux-image-6.8.0-50-generic-64kUbuntu
Fixed in:6.8.0-50.51~22.04.1USN-7154-2
Fixed in:6.8.0-50.51USN-7154-1
linux-image-6.8.0-50-lowlatencyUbuntu
Fixed in:6.8.0-50.51.1~22.04.1USN-7154-1
Fixed in:6.8.0-50.51.1USN-7154-1
linux-image-6.8.0-50-lowlatency-64kUbuntu
Fixed in:6.8.0-50.51.1~22.04.1USN-7154-1
Fixed in:6.8.0-50.51.1USN-7154-1
linux-image-awsUbuntu
Fixed in:6.8.0-1020.22~22.04.1USN-7154-1
Fixed in:6.8.0-1020.22USN-7154-1
linux-image-azureUbuntu
Fixed in:6.8.0-1020.23~22.04.1USN-7196-1
Fixed in:6.8.0-1020.23USN-7196-1
linux-image-azure-fdeUbuntu
Fixed in:6.8.0-1020.23~22.04.1USN-7196-1
Fixed in:6.8.0-1020.23USN-7196-1
linux-image-gcpUbuntu
Fixed in:6.8.0-1019.21~22.04.1USN-7154-1
Fixed in:6.8.0-1019.21USN-7154-1
linux-image-genericUbuntu
Fixed in:6.8.0-50.51USN-7154-1
linux-image-generic-64kUbuntu
Fixed in:6.8.0-50.51USN-7154-1
linux-image-generic-64k-hwe-22.04Ubuntu
Fixed in:6.8.0-50.51~22.04.1USN-7154-2
linux-image-generic-64k-hwe-24.04Ubuntu
Fixed in:6.8.0-50.51USN-7154-1
linux-image-generic-hwe-22.04Ubuntu
Fixed in:6.8.0-50.51~22.04.1USN-7154-2
linux-image-generic-hwe-24.04Ubuntu
Fixed in:6.8.0-50.51USN-7154-1
linux-image-generic-lpaeUbuntu
Fixed in:6.8.0-50.51USN-7154-1
linux-image-gkeUbuntu
Fixed in:6.8.0-1015.19USN-7154-1
linux-image-gkeopUbuntu
Fixed in:6.8.0-1002.4USN-7156-1
linux-image-gkeop-6.8Ubuntu
Fixed in:6.8.0-1002.4USN-7156-1
linux-image-ibmUbuntu
Fixed in:6.8.0-1017.17USN-7154-1
linux-image-ibm-classicUbuntu
Fixed in:6.8.0-1017.17USN-7154-1
linux-image-ibm-lts-24.04Ubuntu
Fixed in:6.8.0-1017.17USN-7154-1
linux-image-kvmUbuntu
Fixed in:6.8.0-50.51USN-7154-1
linux-image-lowlatencyUbuntu
Fixed in:6.8.0-50.51.1USN-7154-1
linux-image-lowlatency-64kUbuntu
Fixed in:6.8.0-50.51.1USN-7154-1
linux-image-lowlatency-64k-hwe-22.04Ubuntu
Fixed in:6.8.0-50.51.1~22.04.1USN-7154-1
linux-image-lowlatency-64k-hwe-24.04Ubuntu
Fixed in:6.8.0-50.51.1USN-7154-1
linux-image-lowlatency-hwe-22.04Ubuntu
Fixed in:6.8.0-50.51.1~22.04.1USN-7154-1
linux-image-lowlatency-hwe-24.04Ubuntu
Fixed in:6.8.0-50.51.1USN-7154-1
linux-image-nvidiaUbuntu
Fixed in:6.8.0-1019.21USN-7155-1
linux-image-nvidia-6.8Ubuntu
Fixed in:6.8.0-1019.21~22.04.1USN-7155-1
linux-image-nvidia-64kUbuntu
Fixed in:6.8.0-1019.21USN-7155-1
linux-image-nvidia-64k-6.8Ubuntu
Fixed in:6.8.0-1019.21~22.04.1USN-7155-1
linux-image-nvidia-64k-hwe-22.04Ubuntu
Fixed in:6.8.0-1019.21~22.04.1USN-7155-1
linux-image-nvidia-hwe-22.04Ubuntu
Fixed in:6.8.0-1019.21~22.04.1USN-7155-1
linux-image-nvidia-lowlatencyUbuntu
Fixed in:6.8.0-1019.21.1USN-7155-1
linux-image-nvidia-lowlatency-64kUbuntu
Fixed in:6.8.0-1019.21.1USN-7155-1
linux-image-oem-22.04Ubuntu
Fixed in:6.8.0-50.51~22.04.1USN-7154-2
linux-image-oem-22.04aUbuntu
Fixed in:6.8.0-50.51~22.04.1USN-7154-2
linux-image-oem-22.04bUbuntu
Fixed in:6.8.0-50.51~22.04.1USN-7154-2
linux-image-oem-22.04cUbuntu
Fixed in:6.8.0-50.51~22.04.1USN-7154-2
linux-image-oem-22.04dUbuntu
Fixed in:6.8.0-50.51~22.04.1USN-7154-2
linux-image-oem-24.04Ubuntu
Fixed in:6.8.0-1018.18USN-7154-1
linux-image-oem-24.04aUbuntu
Fixed in:6.8.0-1018.18USN-7154-1
linux-image-oracleUbuntu
Fixed in:6.8.0-1017.18~22.04.1USN-7154-1
Fixed in:6.8.0-1017.18USN-7154-1
linux-image-oracle-64kUbuntu
Fixed in:6.8.0-1017.18~22.04.1USN-7154-1
Fixed in:6.8.0-1017.18USN-7154-1
linux-image-raspiUbuntu
Fixed in:6.8.0-1016.18USN-7154-1
linux-image-virtualUbuntu
Fixed in:6.8.0-50.51USN-7154-1
linux-image-virtual-hwe-22.04Ubuntu
Fixed in:6.8.0-50.51~22.04.1USN-7154-2
linux-image-virtual-hwe-24.04Ubuntu
Fixed in:6.8.0-50.51USN-7154-1
linux-lowlatencyUbuntu
Fixed in:6.8.0-50.51.1USN-7154-1
linux-lowlatency-hwe-6.8Ubuntu
Fixed in:6.8.0-50.51.1~22.04.1USN-7154-1
linux-nvidiaUbuntu
Fixed in:6.8.0-1019.21USN-7155-1
linux-nvidia-6.8Ubuntu
Fixed in:6.8.0-1019.21~22.04.1USN-7155-1
linux-nvidia-lowlatencyUbuntu
Fixed in:6.8.0-1019.21.1USN-7155-1
linux-oem-6.8Ubuntu
Fixed in:6.8.0-1018.18USN-7154-1
linux-oracleUbuntu
Fixed in:6.8.0-1017.18USN-7154-1
linux-oracle-6.8Ubuntu
Fixed in:6.8.0-1017.18~22.04.1USN-7154-1
linux-raspiUbuntu
Fixed in:6.8.0-1016.18USN-7154-1

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3 Vector

Exploitability

Attack VectorLocal
Attack ComplexityHigh
Privileges RequiredLow
User InteractionNone
ScopeUnchanged

Impact

ConfidentialityNone
IntegrityNone
AvailabilityHigh

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H

Exploit Intelligence

0.22%probability of exploitation in 30 days
13thpercentile

Low risk: more likely to be exploited than 13% of all known CVEs.

References

Related Vulnerabilities

Other CWE-416 (Use After Free) vulnerabilities, ordered by exploit likelihood. View all

CVESeverityCVSSEPSSExploitedFix
CVE-2019-0708Critical9.8100%KEV + Ransom-
CVE-2021-31166Critical9.8100%KEVFix
CVE-2015-5119Critical9.899%KEV-
CVE-2010-3962High8.197%KEV-
CVE-2015-0313Critical9.896%KEVFix
CVE-2017-9798High7.595%-Fix
Embed a live status badge for CVE-2024-43891
CVE-2024-43891 severity badge

Markdown

[![CVE-2024-43891](https://tridentstack.com/cve/badge/CVE-2024-43891.svg)](https://tridentstack.com/cve/CVE-2024-43891)

HTML

<a href="https://tridentstack.com/cve/CVE-2024-43891"><img src="https://tridentstack.com/cve/badge/CVE-2024-43891.svg" alt="CVE-2024-43891"></a>

Find and fix vulnerabilities across your fleet

TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.

Start free

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2024-09-05.