Use-After-Free in Linux kernel (CVE-2024-50121)
Summary
Vulnerability in Linux kernel (CVE-2024-50121). Successful exploitation can lead to full system takeover. Exploitable via nfs4_state_destroy_net.
Original description
The description as published by the source.
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_cach…
Source: NIST National Vulnerability Database NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2024-50121 has been found in Linux kernel.
Attackers can target a specific entry point like nfs4_state_destroy_net over the network to misuse the product.
Successful exploitation can lead to full system takeover. CVSS score: 7.8/10.
What to do: apply the vendor's official patched release.
If unsure, ask your IT team or search "Linux kernel CVE-2024-50121" on the vendor's site.
CVE-2024-50121 (Linux kernel) — CWE-416 / CVSS v3 7.8
Attack vector: local / no user interaction
Attack surface: nfs4_state_destroy_net / nfs4_state_shutdown_net / nfs4_client / nfsd_client_shrinker
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Use-after-free (CWE-416) exists in Linux kernel. Attackers reach the vulnerable code path via nfs4_state_destroy_net.
Check the vendor advisory for the affected versions of Linux kernel. Attack surface: nfs4_state_destroy_net / nfs4_state_shutdown_net / nfs4_client / nfsd_client_shrinker.
Severity: High (CVSS 7.8/10). Successful exploitation can lead to full system takeover.
Update to the patched release per vendor advisory.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Audit SBOM/dependencies to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
Audit SBOM/dependencies for affected components.資産台帳・SBOM・依存マニフェストで Linux kernel を使っているサービスとバージョンを洗い出す。
-
2Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
Fix status by distribution
Fixed packages published by each distribution for this CVE
- Debian DEBIAN-CVE-2024-50121 linux Fixed in: 5.10.234-1
- Ubuntu UBUNTU-CVE-2024-50121 linux
References
- advisory nvd.nist.gov
- advisory github.com
- package git.kernel.org
- web git.kernel.org
- web git.kernel.org
- web git.kernel.org
- web git.kernel.org
- web git.kernel.org
- web git.kernel.org
- web lists.debian.org
- web lists.debian.org
- web cert-portal.siemens.com
- web github.com