{
  "threat_severity" : "Moderate",
  "public_date" : "2024-11-05T00:00:00Z",
  "bugzilla" : {
    "description" : "kernel: nfsd: cancel nfsd_shrinker_work using sync mode in nfs4_state_shutdown_net",
    "id" : "2323905",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2323905"
  },
  "cvss3" : {
    "cvss3_base_score" : "5.7",
    "cvss3_scoring_vector" : "CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:N/A:H",
    "status" : "verified"
  },
  "cwe" : "CWE-416",
  "details" : [ "In the Linux kernel, the following vulnerability has been resolved:\nnfsd: cancel nfsd_shrinker_work using sync mode in nfs4_state_shutdown_net\nIn the normal case, when we excute `echo 0 > /proc/fs/nfsd/threads`, the\nfunction `nfs4_state_destroy_net` in `nfs4_state_shutdown_net` will\nrelease all resources related to the hashed `nfs4_client`. If the\n`nfsd_client_shrinker` is running concurrently, the `expire_client`\nfunction will first unhash this client and then destroy it. This can\nlead to the following warning. Additionally, numerous use-after-free\nerrors may occur as well.\nnfsd_client_shrinker         echo 0 > /proc/fs/nfsd/threads\nexpire_client                nfsd_shutdown_net\nunhash_client                ...\nnfs4_state_shutdown_net\n/* won't wait shrinker exit */\n/*                             cancel_work(&nn->nfsd_shrinker_work)\n* nfsd_file for this          /* won't destroy unhashed client1 */\n* client1 still alive         nfs4_state_destroy_net\n*/\nnfsd_file_cache_shutdown\n/* trigger warning */\nkmem_cache_destroy(nfsd_file_slab)\nkmem_cache_destroy(nfsd_file_mark_slab)\n/* release nfsd_file and mark */\n__destroy_client\n====================================================================\nBUG nfsd_file (Not tainted): Objects remaining in nfsd_file on\n__kmem_cache_shutdown()\n--------------------------------------------------------------------\nCPU: 4 UID: 0 PID: 764 Comm: sh Not tainted 6.12.0-rc3+ #1\ndump_stack_lvl+0x53/0x70\nslab_err+0xb0/0xf0\n__kmem_cache_shutdown+0x15c/0x310\nkmem_cache_destroy+0x66/0x160\nnfsd_file_cache_shutdown+0xac/0x210 [nfsd]\nnfsd_destroy_serv+0x251/0x2a0 [nfsd]\nnfsd_svc+0x125/0x1e0 [nfsd]\nwrite_threads+0x16a/0x2a0 [nfsd]\nnfsctl_transaction_write+0x74/0xa0 [nfsd]\nvfs_write+0x1a5/0x6d0\nksys_write+0xc1/0x160\ndo_syscall_64+0x5f/0x170\nentry_SYSCALL_64_after_hwframe+0x76/0x7e\n====================================================================\nBUG nfsd_file_mark (Tainted: G    B   W         ): Objects remaining\nnfsd_file_mark on __kmem_cache_shutdown()\n--------------------------------------------------------------------\ndump_stack_lvl+0x53/0x70\nslab_err+0xb0/0xf0\n__kmem_cache_shutdown+0x15c/0x310\nkmem_cache_destroy+0x66/0x160\nnfsd_file_cache_shutdown+0xc8/0x210 [nfsd]\nnfsd_destroy_serv+0x251/0x2a0 [nfsd]\nnfsd_svc+0x125/0x1e0 [nfsd]\nwrite_threads+0x16a/0x2a0 [nfsd]\nnfsctl_transaction_write+0x74/0xa0 [nfsd]\nvfs_write+0x1a5/0x6d0\nksys_write+0xc1/0x160\ndo_syscall_64+0x5f/0x170\nentry_SYSCALL_64_after_hwframe+0x76/0x7e\nTo resolve this issue, cancel `nfsd_shrinker_work` using synchronous\nmode in nfs4_state_shutdown_net." ],
  "affected_release" : [ {
    "product_name" : "Red Hat Enterprise Linux 9",
    "release_date" : "2025-05-13T00:00:00Z",
    "advisory" : "RHSA-2025:6966",
    "cpe" : "cpe:/a:redhat:enterprise_linux:9",
    "package" : "kernel-0:5.14.0-570.12.1.el9_6"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "release_date" : "2025-05-13T00:00:00Z",
    "advisory" : "RHSA-2025:6966",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9",
    "package" : "kernel-0:5.14.0-570.12.1.el9_6"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9.4 Extended Update Support",
    "release_date" : "2025-09-25T00:00:00Z",
    "advisory" : "RHSA-2025:16669",
    "cpe" : "cpe:/a:redhat:rhel_eus:9.4",
    "package" : "kernel-0:5.14.0-427.91.1.el9_4"
  } ],
  "package_state" : [ {
    "product_name" : "Red Hat Enterprise Linux 6",
    "fix_state" : "Out of support scope",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:6"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "fix_state" : "Out of support scope",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "fix_state" : "Out of support scope",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "fix_state" : "Not affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:8"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "fix_state" : "Not affected",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:8"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "fix_state" : "Will not fix",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9"
  } ],
  "references" : [ "https://www.cve.org/CVERecord?id=CVE-2024-50121\nhttps://nvd.nist.gov/vuln/detail/CVE-2024-50121\nhttps://lore.kernel.org/linux-cve-announce/2024110556-CVE-2024-50121-2a0a@gregkh/T" ],
  "name" : "CVE-2024-50121",
  "mitigation" : {
    "value" : "To mitigate this issue, prevent module nfsd from being loaded. Please see https://access.redhat.com/solutions/41278 for how to blacklist a kernel module to prevent it from loading automatically.",
    "lang" : "en:us"
  },
  "csaw" : false
}