CVE-2024-56549
Severity CVSS v4.0:
Pending analysis
Type:
CWE-476
NULL Pointer Dereference
Publication date:
27/12/2024
Last modified:
03/11/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
cachefiles: Fix NULL pointer dereference in object->file<br />
<br />
At present, the object->file has the NULL pointer dereference problem in<br />
ondemand-mode. The root cause is that the allocated fd and object->file<br />
lifetime are inconsistent, and the user-space invocation to anon_fd uses<br />
object->file. Following is the process that triggers the issue:<br />
<br />
[write fd] [umount]<br />
cachefiles_ondemand_fd_write_iter<br />
fscache_cookie_state_machine<br />
cachefiles_withdraw_cookie<br />
if (!file) return -ENOBUFS<br />
cachefiles_clean_up_object<br />
cachefiles_unmark_inode_in_use<br />
fput(object->file)<br />
object->file = NULL<br />
// file NULL pointer dereference!<br />
__cachefiles_write(..., file, ...)<br />
<br />
Fix this issue by add an additional reference count to the object->file<br />
before write/llseek, and decrement after it finished.
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.19 (including) | 6.11.11 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.12 (including) | 6.12.2 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/31ad74b20227ce6b40910ff78b1c604e42975cf1
- https://git.kernel.org/stable/c/785408bbafcfa24c9fc5b251f03fd0780ce182bd
- https://git.kernel.org/stable/c/9582c7664103c9043e80a78f5c382aa6bdd67418
- https://git.kernel.org/stable/c/d6bba3ece960129a553d4b16f1b00c884dc0993a
- https://git.kernel.org/stable/c/f98770440c9bc468e2fd878212ec9526dbe08293
- https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html



