# CVE-2024-43891: tracing: Have format file honor EVENT\_FILE\_FL\_FREED

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.32% (percentile 18, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2024-08-26T10:10:44.790Z
- **Modified:** 2026-08-05T11:37:00.918Z

## Who should check

- Anyone running Linux \>= 14aa4f3efc6e784847e8c8543a7ef34ec9bdbb01, \< 4ed03758ddf0b19d69eed69386d65a92d0091e0c; \>= b63db58e2fa5d6963db9c45df88e60060f0ff35f, \< 531dc6780d94245af037c25c2371c8caf652f0f9; \>= b63db58e2fa5d6963db9c45df88e60060f0ff35f, \< b1560408692cd0ab0370cfbe9deb03ce97ab3f6d; \>= 6.6.33, \< 6.6.49
- Anyone running Linux 6.9

## 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.

## Affected and fixed versions

- Linux: \>= 14aa4f3efc6e784847e8c8543a7ef34ec9bdbb01, \< 4ed03758ddf0b19d69eed69386d65a92d0091e0c; \>= b63db58e2fa5d6963db9c45df88e60060f0ff35f, \< 531dc6780d94245af037c25c2371c8caf652f0f9; \>= b63db58e2fa5d6963db9c45df88e60060f0ff35f, \< b1560408692cd0ab0370cfbe9deb03ce97ab3f6d; \>= 6.6.33, \< 6.6.49 (cvelist)
- Linux: 6.9 (cvelist)

## Mitigation

- Upgrade Linux to 6.6.49 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-43891. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-43891.md
Affected: Linux >= 14aa4f3efc6e784847e8c8543a7ef34ec9bdbb01, < 4ed03758ddf0b19d69eed69386d65a92d0091e0c; >= b63db58e2fa5d6963db9c45df88e60060f0ff35f, < 531dc6780d94245af037c25c2371c8caf652f0f9; >= b63db58e2fa5d6963db9c45df88e60060f0ff35f, < b1560408692cd0ab0370cfbe9deb03ce97ab3f6d; >= 6.6.33, < 6.6.49; Linux…
Fixed in: Linux 4ed03758ddf0b19d69eed69386d65a92d0091e0c, Linux 531dc6780d94245af037c25c2371c8caf652f0f9, Linux 6.6.49

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-43891 being exploited?

There is no confirmed exploitation: CVE-2024-43891 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.32% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-43891?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-43891?

Linux \>= 14aa4f3efc6e784847e8c8543a7ef34ec9bdbb01, \< 4ed03758ddf0b19d69eed69386d65a92d0091e0c; \>= b63db58e2fa5d6963db9c45df88e60060f0ff35f, \< 531dc6780d94245af037c25c2371c8caf652f0f9; \>= b63db58e2fa5d6963db9c45df88e60060f0ff35f, \< b1560408692cd0ab0370cfbe9deb03ce97ab3f6d; \>= 6.6.33, \< 6.6.49; Linux 6.9.

### Is there a fix for CVE-2024-43891?

Yes. Fixed in Linux 4ed03758ddf0b19d69eed69386d65a92d0091e0c, Linux 531dc6780d94245af037c25c2371c8caf652f0f9, Linux 6.6.49. Upgrade Linux to 6.6.49 or later.

### How do I check if I'm affected by CVE-2024-43891?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/4ed03758ddf0b19d69eed69386d65a92d0091e0c>
- patch: <https://git.kernel.org/stable/c/531dc6780d94245af037c25c2371c8caf652f0f9>
- patch: <https://git.kernel.org/stable/c/b1560408692cd0ab0370cfbe9deb03ce97ab3f6d>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-43891>

HTML: <https://flawdb.com/CVE-2024-43891> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-43891>
