CVE-2024-45000: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: fs/netfs/fscache_cookie: add missing "n_accesses" check This fixes a NULL pointer dereference bug due to a data race which looks like this: BUG: kernel NULL pointer dereference, address: 0000000000000008 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] SMP PTI CPU: 33 PID: 16573 Comm: kworker/u97:799 Not tainted 6.8.7-cm4all1-hp+ #43 Hardware name: HP ProLiant DL380 Gen9/ProLiant DL380 Gen9, BIOS P89 10/17/2018 Workqueue: events_unbound netfs_rreq_write_to_cache_work RIP: 0010:cachefiles_prepare_write+0x30/0xa0 Code: 57 41 56 45 89 ce 41 55 49 89 cd 41 54 49 89 d4 55 53 48 89 fb 48 83 ec 08 48 8b 47 08 48 83 7f 10 00 48 89 34 24 48 8b 68 20 <48> 8b 45 08 4c 8b 38 74 45 49 8b 7f 50 e8 4e a9 b0 ff 48 8b 73 10 RSP: 0018:ffffb4e78113bde0 EFLAGS: 00010286 RAX: ffff976126be6d10 RBX: ffff97615cdb8438 RCX: 0000000000020000 RDX: ffff97605e6c4c68 RSI: ffff97605e6c4c60 RDI: ffff97615cdb8438 RBP: 0000000000000000 R08: 0000000000278333 R09: 0000000000000001 R10: ffff97605e6c4600 R11: 0000000000000001 R12: ffff97605e6c4c68 R13: 0000000000020000 R14: 0000000000000001 R15: ffff976064fe2c00 FS: 0000000000000000(0000) GS:ffff9776dfd40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000008 CR3: 000000005942c002 CR4: 00000000001706f0 Call Trace: <TASK> ? __die+0x1f/0x70 ? page_fault_oops+0x15d/0x440 ? search_module_extables+0xe/0x40 ? fixup_exception+0x22/0x2f0 ? exc_page_fault+0x5f/0x100 ? asm_exc_page_fault+0x22/0x30 ? cachefiles_prepare_write+0x30/0xa0 netfs_rreq_write_to_cache_work+0x135/0x2e0 process_one_work+0x137/0x2c0 worker_thread+0x2e9/0x400 ? __pfx_worker_thread+0x10/0x10 kthread+0xcc/0x100 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x30/0x50 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1b/0x30 </TASK> Modules linked in: CR2: 0000000000000008 ---[ end trace 0000000000000000 ]--- This happened because fscache_cookie_state_machine() was slow and was still running while another process invoked fscache_unuse_cookie(); this led to a fscache_cookie_lru_do_one() call, setting the FSCACHE_COOKIE_DO_LRU_DISCARD flag, which was picked up by fscache_cookie_state_machine(), withdrawing the cookie via cachefiles_withdraw_cookie(), clearing cookie->cache_priv. At the same time, yet another process invoked cachefiles_prepare_write(), which found a NULL pointer in this code line: struct cachefiles_object *object = cachefiles_cres_object(cres); The next line crashes, obviously: struct cachefiles_cache *cache = object->volume->cache; During cachefiles_prepare_write(), the "n_accesses" counter is non-zero (via fscache_begin_operation()). The cookie must not be withdrawn until it drops to zero. The counter is checked by fscache_cookie_state_machine() before switching to FSCACHE_COOKIE_STATE_RELINQUISHING and FSCACHE_COOKIE_STATE_WITHDRAWING (in "case FSCACHE_COOKIE_STATE_FAILED"), but not for FSCACHE_COOKIE_STATE_LRU_DISCARDING ("case FSCACHE_COOKIE_STATE_ACTIVE"). This patch adds the missing check. With a non-zero access counter, the function returns and the next fscache_end_cookie_access() call will queue another fscache_cookie_state_machine() call to handle the still-pending FSCACHE_COOKIE_DO_LRU_DISCARD.
AI Analysis
Technical Summary
CVE-2024-45000 is a vulnerability in the Linux kernel's cachefiles subsystem, specifically within the fs/netfs/fscache_cookie component. The issue arises from a missing check on the "n_accesses" counter during the state machine transitions of cache cookies. The vulnerability manifests as a NULL pointer dereference caused by a data race condition. In detail, the function fscache_cookie_state_machine() can be slow and still running when another process calls fscache_unuse_cookie(), which triggers fscache_cookie_lru_do_one() to set the FSCACHE_COOKIE_DO_LRU_DISCARD flag. This flag leads to cachefiles_withdraw_cookie() being called, which clears the cookie's cache_priv pointer. Concurrently, another process may invoke cachefiles_prepare_write(), which attempts to dereference this now NULL pointer, resulting in a kernel NULL pointer dereference and a system crash (kernel oops). The root cause is that the "n_accesses" counter, which tracks active accesses to the cookie, is not checked before transitioning to the FSCACHE_COOKIE_STATE_LRU_DISCARDING state. The patch fixes this by adding the missing check, ensuring that if the access counter is non-zero, the state machine defers discarding the cookie until all accesses complete. This vulnerability can cause denial of service (DoS) by crashing the kernel due to the NULL pointer dereference. It affects Linux kernel versions prior to the patch and is triggered under conditions involving concurrent operations on cachefiles cookies, which are used for caching network filesystem data. No known exploits are reported in the wild yet, and no CVSS score has been assigned. The vulnerability requires kernel-level access or conditions where multiple kernel threads interact with the cachefiles subsystem, but does not require user interaction. The impact is primarily on system availability due to kernel crashes.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to systems running affected Linux kernel versions with the cachefiles subsystem enabled and in use, particularly those utilizing network filesystem caching. The impact is a potential denial of service through kernel crashes, which can disrupt critical services, especially in data centers, cloud environments, and enterprise servers. Organizations relying on Linux-based infrastructure for file sharing, storage caching, or network filesystem acceleration may experience unexpected reboots or downtime. This can affect service availability, leading to operational disruptions and potential financial losses. While the vulnerability does not directly expose confidentiality or integrity risks, the availability impact can be significant in environments requiring high uptime and reliability. Additionally, kernel crashes can complicate incident response and recovery efforts. Given the widespread use of Linux in European government, financial, telecommunications, and industrial sectors, the vulnerability could affect critical infrastructure if exploited or triggered inadvertently. However, exploitation requires specific conditions involving concurrent kernel operations, limiting the ease of exploitation. No known active exploits reduce immediate risk but patching is advised to prevent future exploitation.
Mitigation Recommendations
European organizations should prioritize updating their Linux kernels to versions that include the patch fixing CVE-2024-45000. Specifically, kernel maintainers and system administrators must apply the fix that adds the missing "n_accesses" check in the fscache_cookie_state_machine() function. For environments where immediate patching is not feasible, consider disabling the cachefiles subsystem if it is not essential, to mitigate exposure. Monitoring kernel logs for signs of NULL pointer dereference crashes related to cachefiles can help detect attempts to trigger this vulnerability. Implementing robust kernel crash recovery and high availability mechanisms will reduce downtime impact. Organizations should also review concurrent workload patterns that heavily utilize network filesystem caching to identify potential triggers. Coordination with Linux distribution vendors for timely patch deployment is critical. Finally, ensure that kernel debugging and tracing tools are enabled to facilitate rapid diagnosis if crashes occur.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Italy, Spain, Poland, Belgium
CVE-2024-45000: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: fs/netfs/fscache_cookie: add missing "n_accesses" check This fixes a NULL pointer dereference bug due to a data race which looks like this: BUG: kernel NULL pointer dereference, address: 0000000000000008 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] SMP PTI CPU: 33 PID: 16573 Comm: kworker/u97:799 Not tainted 6.8.7-cm4all1-hp+ #43 Hardware name: HP ProLiant DL380 Gen9/ProLiant DL380 Gen9, BIOS P89 10/17/2018 Workqueue: events_unbound netfs_rreq_write_to_cache_work RIP: 0010:cachefiles_prepare_write+0x30/0xa0 Code: 57 41 56 45 89 ce 41 55 49 89 cd 41 54 49 89 d4 55 53 48 89 fb 48 83 ec 08 48 8b 47 08 48 83 7f 10 00 48 89 34 24 48 8b 68 20 <48> 8b 45 08 4c 8b 38 74 45 49 8b 7f 50 e8 4e a9 b0 ff 48 8b 73 10 RSP: 0018:ffffb4e78113bde0 EFLAGS: 00010286 RAX: ffff976126be6d10 RBX: ffff97615cdb8438 RCX: 0000000000020000 RDX: ffff97605e6c4c68 RSI: ffff97605e6c4c60 RDI: ffff97615cdb8438 RBP: 0000000000000000 R08: 0000000000278333 R09: 0000000000000001 R10: ffff97605e6c4600 R11: 0000000000000001 R12: ffff97605e6c4c68 R13: 0000000000020000 R14: 0000000000000001 R15: ffff976064fe2c00 FS: 0000000000000000(0000) GS:ffff9776dfd40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000008 CR3: 000000005942c002 CR4: 00000000001706f0 Call Trace: <TASK> ? __die+0x1f/0x70 ? page_fault_oops+0x15d/0x440 ? search_module_extables+0xe/0x40 ? fixup_exception+0x22/0x2f0 ? exc_page_fault+0x5f/0x100 ? asm_exc_page_fault+0x22/0x30 ? cachefiles_prepare_write+0x30/0xa0 netfs_rreq_write_to_cache_work+0x135/0x2e0 process_one_work+0x137/0x2c0 worker_thread+0x2e9/0x400 ? __pfx_worker_thread+0x10/0x10 kthread+0xcc/0x100 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x30/0x50 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1b/0x30 </TASK> Modules linked in: CR2: 0000000000000008 ---[ end trace 0000000000000000 ]--- This happened because fscache_cookie_state_machine() was slow and was still running while another process invoked fscache_unuse_cookie(); this led to a fscache_cookie_lru_do_one() call, setting the FSCACHE_COOKIE_DO_LRU_DISCARD flag, which was picked up by fscache_cookie_state_machine(), withdrawing the cookie via cachefiles_withdraw_cookie(), clearing cookie->cache_priv. At the same time, yet another process invoked cachefiles_prepare_write(), which found a NULL pointer in this code line: struct cachefiles_object *object = cachefiles_cres_object(cres); The next line crashes, obviously: struct cachefiles_cache *cache = object->volume->cache; During cachefiles_prepare_write(), the "n_accesses" counter is non-zero (via fscache_begin_operation()). The cookie must not be withdrawn until it drops to zero. The counter is checked by fscache_cookie_state_machine() before switching to FSCACHE_COOKIE_STATE_RELINQUISHING and FSCACHE_COOKIE_STATE_WITHDRAWING (in "case FSCACHE_COOKIE_STATE_FAILED"), but not for FSCACHE_COOKIE_STATE_LRU_DISCARDING ("case FSCACHE_COOKIE_STATE_ACTIVE"). This patch adds the missing check. With a non-zero access counter, the function returns and the next fscache_end_cookie_access() call will queue another fscache_cookie_state_machine() call to handle the still-pending FSCACHE_COOKIE_DO_LRU_DISCARD.
AI-Powered Analysis
Technical Analysis
CVE-2024-45000 is a vulnerability in the Linux kernel's cachefiles subsystem, specifically within the fs/netfs/fscache_cookie component. The issue arises from a missing check on the "n_accesses" counter during the state machine transitions of cache cookies. The vulnerability manifests as a NULL pointer dereference caused by a data race condition. In detail, the function fscache_cookie_state_machine() can be slow and still running when another process calls fscache_unuse_cookie(), which triggers fscache_cookie_lru_do_one() to set the FSCACHE_COOKIE_DO_LRU_DISCARD flag. This flag leads to cachefiles_withdraw_cookie() being called, which clears the cookie's cache_priv pointer. Concurrently, another process may invoke cachefiles_prepare_write(), which attempts to dereference this now NULL pointer, resulting in a kernel NULL pointer dereference and a system crash (kernel oops). The root cause is that the "n_accesses" counter, which tracks active accesses to the cookie, is not checked before transitioning to the FSCACHE_COOKIE_STATE_LRU_DISCARDING state. The patch fixes this by adding the missing check, ensuring that if the access counter is non-zero, the state machine defers discarding the cookie until all accesses complete. This vulnerability can cause denial of service (DoS) by crashing the kernel due to the NULL pointer dereference. It affects Linux kernel versions prior to the patch and is triggered under conditions involving concurrent operations on cachefiles cookies, which are used for caching network filesystem data. No known exploits are reported in the wild yet, and no CVSS score has been assigned. The vulnerability requires kernel-level access or conditions where multiple kernel threads interact with the cachefiles subsystem, but does not require user interaction. The impact is primarily on system availability due to kernel crashes.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to systems running affected Linux kernel versions with the cachefiles subsystem enabled and in use, particularly those utilizing network filesystem caching. The impact is a potential denial of service through kernel crashes, which can disrupt critical services, especially in data centers, cloud environments, and enterprise servers. Organizations relying on Linux-based infrastructure for file sharing, storage caching, or network filesystem acceleration may experience unexpected reboots or downtime. This can affect service availability, leading to operational disruptions and potential financial losses. While the vulnerability does not directly expose confidentiality or integrity risks, the availability impact can be significant in environments requiring high uptime and reliability. Additionally, kernel crashes can complicate incident response and recovery efforts. Given the widespread use of Linux in European government, financial, telecommunications, and industrial sectors, the vulnerability could affect critical infrastructure if exploited or triggered inadvertently. However, exploitation requires specific conditions involving concurrent kernel operations, limiting the ease of exploitation. No known active exploits reduce immediate risk but patching is advised to prevent future exploitation.
Mitigation Recommendations
European organizations should prioritize updating their Linux kernels to versions that include the patch fixing CVE-2024-45000. Specifically, kernel maintainers and system administrators must apply the fix that adds the missing "n_accesses" check in the fscache_cookie_state_machine() function. For environments where immediate patching is not feasible, consider disabling the cachefiles subsystem if it is not essential, to mitigate exposure. Monitoring kernel logs for signs of NULL pointer dereference crashes related to cachefiles can help detect attempts to trigger this vulnerability. Implementing robust kernel crash recovery and high availability mechanisms will reduce downtime impact. Organizations should also review concurrent workload patterns that heavily utilize network filesystem caching to identify potential triggers. Coordination with Linux distribution vendors for timely patch deployment is critical. Finally, ensure that kernel debugging and tracing tools are enabled to facilitate rapid diagnosis if crashes occur.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-08-21T05:34:56.677Z
- Cisa Enriched
- true
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9826c4522896dcbe0e3b
Added to database: 5/21/2025, 9:08:54 AM
Last enriched: 6/28/2025, 11:40:10 PM
Last updated: 8/9/2025, 8:21:13 AM
Views: 12
Related Threats
CVE-2025-50610: n/a
HighCVE-2025-50609: n/a
HighCVE-2025-50608: n/a
HighCVE-2025-55194: CWE-248: Uncaught Exception in Part-DB Part-DB-server
MediumCVE-2025-55197: CWE-400: Uncontrolled Resource Consumption in py-pdf pypdf
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.