CVE-2024-57892

Severity CVSS v4.0:
Pending analysis
Type:
CWE-416 Use After Free
Publication date:
15/01/2025
Last modified:
03/11/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> ocfs2: fix slab-use-after-free due to dangling pointer dqi_priv<br /> <br /> When mounting ocfs2 and then remounting it as read-only, a<br /> slab-use-after-free occurs after the user uses a syscall to<br /> quota_getnextquota. Specifically, sb_dqinfo(sb, type)-&gt;dqi_priv is the<br /> dangling pointer.<br /> <br /> During the remounting process, the pointer dqi_priv is freed but is never<br /> set as null leaving it to be accessed. Additionally, the read-only option<br /> for remounting sets the DQUOT_SUSPENDED flag instead of setting the<br /> DQUOT_USAGE_ENABLED flags. Moreover, later in the process of getting the<br /> next quota, the function ocfs2_get_next_id is called and only checks the<br /> quota usage flags and not the quota suspended flags.<br /> <br /> To fix this, I set dqi_priv to null when it is freed after remounting with<br /> read-only and put a check for DQUOT_SUSPENDED in ocfs2_get_next_id.<br /> <br /> [akpm@linux-foundation.org: coding-style cleanups]

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.6 (including) 6.1.125 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.2 (including) 6.6.70 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.7 (including) 6.12.9 (excluding)
cpe:2.3:o:linux:linux_kernel:6.13:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc5:*:*:*:*:*:*