Linux: Use After Free
CVE-2024-50121 is a high-severity use after free vulnerability in Linux, with a CVSS 3.1 base score of 7.8 out of 10. It can be exploited with local access to the system by an attacker with a low-privileged account, without any action from a user. The record lists versions f67138dd338cb564ade7d3755c8cd4f68b46d397, 5ade4382de16c34d9259cb548f36ec5c4555913c, 36775f42e039b01d4abe8998bf66771a37d3cdcc as the first without the flaw, so updating Linux to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.23% chance of exploitation within 30 days, which is low compared with other CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update Linux to f67138dd338cb564ade7d3755c8cd4f68b46d397 or 5ade4382de16c34d9259cb548f36ec5c4555913c or 36775f42e039b01d4abe8998bf66771a37d3cdcc or f965dc0f099a54fca100acf6909abe52d0c85328, whichever matches your release line, or a later version.
- Update SIMATIC S7-1500 TM MFP - GNU/Linux subsystem to V1.1.1 or a later version.
- Update Linux Kernel to 5.15 or 6.1 or 6.6.59 or 6.11.6, whichever matches your release line, or a later version.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Linux | Linux | 2bbf10861d51dae76c6da7113516d0071c782653 up to, but not including, f67138dd338cb564ade7d3755c8cd4f68b46d397; 958294a3eb82026fcfff20b0287a90e9c854785e up to, but not including, 5ade4382de16c34d9259cb548f36ec5c4555913c; f3ea5ec83d1a827f074b2b660749817e0bf2b23e up to, but not including, 36775f42e039b01d4abe8998bf66771a37d3cdcc; 7c24fa225081f31bc6da6a355c1ba801889ab29a up to, but not including, f965dc0f099a54fca100acf6909abe52d0c85328; 7c24fa225081f31bc6da6a355c1ba801889ab29a up to, but not including, add1df5eba163a3a6ece11cb85890e2e410baaea; 7c24fa225081f31bc6da6a355c1ba801889ab29a up to, but not including, d5ff2fb2e7167e9483846e34148e60c0c016a1f6; 5.10.220 up to, but not including, 5.10.233; 5.15.154 up to, but not including, 5.15.176; and 2 more ranges | f67138dd338cb564ade7d3755c8cd4f68b46d397, 5ade4382de16c34d9259cb548f36ec5c4555913c, 36775f42e039b01d4abe8998bf66771a37d3cdcc, f965dc0f099a54fca100acf6909abe52d0c85328, add1df5eba163a3a6ece11cb85890e2e410baaea, d5ff2fb2e7167e9483846e34148e60c0c016a1f6 |
| Siemens | SIMATIC S7-1500 TM MFP - GNU/Linux subsystem | before V1.1.1 | V1.1.1 |
| Linux | Linux Kernel | 5.10.220 up to, but not including, 5.15; 5.15.154 up to, but not including, 6.1; 6.2 up to, but not including, 6.6.59; 6.7 up to, but not including, 6.11.6; 6.12 | 5.15, 6.1, 6.6.59, 6.11.6 |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- LocalThe attacker needs local access or must trick a user into running something.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- LowA basic user account is enough.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.8 | High | NVD |
| CVSS 3.1 | 7.8 | High | CISA (ADP) |
Official description
In the Linux kernel, the following vulnerability has been resolved: nfsd: cancel nfsd_shrinker_work using sync mode in nfs4_state_shutdown_net In the normal case, when we excute `echo 0 > /proc/fs/nfsd/threads`, the function `nfs4_state_destroy_net` in `nfs4_state_shutdown_net` will release all resources related to the hashed `nfs4_client`. If the `nfsd_client_shrinker` is running concurrently, the `expire_client` function will first unhash this client and then destroy it. This can lead to the following warning. Additionally, numerous use-after-free errors may occur as well. nfsd_client_shrinker echo 0 > /proc/fs/nfsd/threads expire_client nfsd_shutdown_net unhash_client ... nfs4_state_shutdown_net /* won't wait shrinker exit */ /* cancel_work(&nn->nfsd_shrinker_work) * nfsd_file for this /* won't destroy unhashed client1 */ * client1 still alive nfs4_state_destroy_net */ nfsd_file_cache_shutdown /* trigger warning */ kmem_cache_destroy(nfsd_file_slab) kmem_cache_destroy(nfsd_file_mark_slab) /* release nfsd_file and mark */ __destroy_client ==================================================================== BUG nfsd_file (Not tainted): Objects remaining in nfsd_file on __kmem_cache_shutdown() -------------------------------------------------------------------- CPU: 4 UID: 0 PID: 764 Comm: sh Not tainted 6.12.0-rc3+ #1 dump_stack_lvl+0x53/0x70 slab_err+0xb0/0xf0 __kmem_cache_shutdown+0x15c/0x310 kmem_cache_destroy+0x66/0x160 nfsd_file_cache_shutdown+0xac/0x210 [nfsd] nfsd_destroy_serv+0x251/0x2a0 [nfsd] nfsd_svc+0x125/0x1e0 [nfsd] write_threads+0x16a/0x2a0 [nfsd] nfsctl_transaction_write+0x74/0xa0 [nfsd] vfs_write+0x1a5/0x6d0 ksys_write+0xc1/0x160 do_syscall_64+0x5f/0x170 entry_SYSCALL_64_after_hwframe+0x76/0x7e ==================================================================== BUG nfsd_file_mark (Tainted: G B W ): Objects remaining nfsd_file_mark on __kmem_cache_shutdown() -------------------------------------------------------------------- dump_stack_lvl+0x53/0x70 slab_err+0xb0/0xf0 __kmem_cache_shutdown+0x15c/0x310 kmem_cache_destroy+0x66/0x160 nfsd_file_cache_shutdown+0xc8/0x210 [nfsd] nfsd_destroy_serv+0x251/0x2a0 [nfsd] nfsd_svc+0x125/0x1e0 [nfsd] write_threads+0x16a/0x2a0 [nfsd] nfsctl_transaction_write+0x74/0xa0 [nfsd] vfs_write+0x1a5/0x6d0 ksys_write+0xc1/0x160 do_syscall_64+0x5f/0x170 entry_SYSCALL_64_after_hwframe+0x76/0x7e To resolve this issue, cancel `nfsd_shrinker_work` using synchronous mode in nfs4_state_shutdown_net.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Use After Free
The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory belongs to the code that operates on the new pointer.
How developers prevent this class of flaw
- Choose a language that provides automatic memory management.
- When freeing pointers, be sure to set them to NULL once they are freed. However, the utilization of multiple or complex data structures may lower the usefulness of this strategy.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
Other references
- git.kernel.org/stable/c/36775f42e039b01d4abe8998bf66771a37d3cdcc
- git.kernel.org/stable/c/5ade4382de16c34d9259cb548f36ec5c4555913c
- git.kernel.org/stable/c/f67138dd338cb564ade7d3755c8cd4f68b46d397
- lists.debian.org/debian-lts-announce/2025/03/msg00001.html
- lists.debian.org/debian-lts-announce/2025/03/msg00002.html
- cert-portal.siemens.com/productcert/html/ssa-265688.html
Recent Use After Free vulnerabilities
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
Spotted an error? Tell us.