CVE-2024-57892

ocfs2: fix slab-use-after-free due to dangling pointer dqi_priv

7.8 high EPSS 0.22%

Published 15 Jan 2025 Updated 11 May 2026 CNA: Linux

Check your servers for CVE-2024-57892

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-57892 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

In the Linux kernel, the following vulnerability has been resolved:

ocfs2: fix slab-use-after-free due to dangling pointer dqi_priv

When mounting ocfs2 and then remounting it as read-only, a slab-use-after-free occurs after the user uses a syscall to quota_getnextquota. Specifically, sb_dqinfo(sb, type)->dqi_priv is the dangling pointer.

During the remounting process, the pointer dqi_priv is freed but is never set as null leaving it to be accessed. Additionally, the read-only option for remounting sets the DQUOT_SUSPENDED flag instead of setting the DQUOT_USAGE_ENABLED flags. Moreover, later in the process of getting the next quota, the function ocfs2_get_next_id is called and only checks the quota usage flags and not the quota suspended flags.

To fix this, I set dqi_priv to null when it is freed after remounting with read-only and put a check for DQUOT_SUSPENDED in ocfs2_get_next_id.

[akpm@linux-foundation.org: coding-style cleanups]

Severity (CVSS)

7.8 high CVSS 3.1 from CISA (ADP)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack vector
local: the attacker needs local access, or a user has to open a prepared file
Attack complexity
low: an attack works without special conditions
Privileges required
low: the attacker needs an ordinary user account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.22%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 13.4% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 13 Feb 2025):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
total: full control of the component or of its data

Weakness

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 8f9e8f5fcc059a3cba87ce837c88316797ef3645, before 58f9e20e2a7602e1dd649a1ec4790077c251cb6c
affected from 8f9e8f5fcc059a3cba87ce837c88316797ef3645, before 8ff6f635a08c30559ded0c110c7ce03ba7747d11
affected from 8f9e8f5fcc059a3cba87ce837c88316797ef3645, before f44e6d70c100614c211703f065cad448050e4a0e
affected from 8f9e8f5fcc059a3cba87ce837c88316797ef3645, before 2d431192486367eee03cc28d0b53b97dafcb8e63
affected from 8f9e8f5fcc059a3cba87ce837c88316797ef3645, before 2e3d203b1adede46bbba049e497765d67865be18
affected from 8f9e8f5fcc059a3cba87ce837c88316797ef3645, before ba950a02d8d23811aa1120affd3adedcfac6153d
affected from 8f9e8f5fcc059a3cba87ce837c88316797ef3645, before 5f3fd772d152229d94602bca243fbb658068a597
Other versions: unaffected
Linux
affected 4.6
unaffected before 4.6
unaffected from 5.4.290 up to and including 5.4.*
unaffected from 5.10.234 up to and including 5.10.*
unaffected from 5.15.177 up to and including 5.15.*
unaffected from 6.1.125 up to and including 6.1.*
unaffected from 6.6.70 up to and including 6.6.*
unaffected from 6.12.9 up to and including 6.12.*
unaffected 6.13 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2024-57892 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2024-57892

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2024-57892
trivy image --scanners vuln IMAGE | grep CVE-2024-57892

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2024-57892 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.