Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C079F12CDA8 for ; Fri, 24 May 2024 15:02:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716562942; cv=none; b=hm2avqoZX5hZ7L/bxGHAkKEHEKbX8lvvn7HEMM/hwLAFiUbh9s7tDQzWqjo4Ak+tR9z1BSuVBeObspv3CMdfkicOyrpppCVCtyNj7x8O837gcIo39Q8zTqvBUzIhJ29MJ5APKosW/Bgl53bUpig+CSFzshjMkQL+WqjCuWcKBSs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716562942; c=relaxed/simple; bh=LaKEVkELB/Oqz3LZ5dko/MFbLoLlVXgnyJjz/X3CsoA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=TwKp2JqAwOZtbZenMtcUIGzWWDIYAmzrhg1A/qNw8ef4C3OfDgPB1JSBOgtiOZAn2LZuMDyvSJVaVHIDlJKlq970GBm0VJRDzmH5WRlZW/2oqg9XuulnvffO/CAfqT5jWpeR/1Dgl7LQk6kjFummVQEBefX2VCi7SZFLYLZ9gDc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=whtQaGvn; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="whtQaGvn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3DF4DC2BBFC; Fri, 24 May 2024 15:02:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716562942; bh=LaKEVkELB/Oqz3LZ5dko/MFbLoLlVXgnyJjz/X3CsoA=; h=From:To:Cc:Subject:Date:Reply-to:From; b=whtQaGvnl2sbNzUWYu2ZEs37iAbq5XFOSX5LucAcTcudL2GFxtSXfjAP+/kjZsiat ZiJO3UelYYQhxdde6eQwsRoJ1rzIvQolNBcvqAsGVSJVVUCsQb3fkfgZkby1TnlftN v0RRLEjsSWeVl+NNlpicio62ddUc0OCWbye5QgA8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47507: nfsd: Fix nsfd startup race (again) Date: Fri, 24 May 2024 17:01:56 +0200 Message-ID: <2024052452-CVE-2021-47507-e722@gregkh> X-Mailer: git-send-email 2.45.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2904; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=LaKEVkELB/Oqz3LZ5dko/MFbLoLlVXgnyJjz/X3CsoA=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkBqx/caLzEO7Vxe1rSxHWhf/xLeh784zHOu526Ks/81 BmBnev3dsSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBELuxlmB8wwSrUas/cyogl /icU6x4xGrF81GVYMNfrpCzDxOYpv5eecYpIWH98gtvtVAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: nfsd: Fix nsfd startup race (again) Commit bd5ae9288d64 ("nfsd: register pernet ops last, unregister first") has re-opened rpc_pipefs_event() race against nfsd_net_id registration (register_pernet_subsys()) which has been fixed by commit bb7ffbf29e76 ("nfsd: fix nsfd startup race triggering BUG_ON"). Restore the order of register_pernet_subsys() vs register_cld_notifier(). Add WARN_ON() to prevent a future regression. Crash info: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000012 CPU: 8 PID: 345 Comm: mount Not tainted 5.4.144-... #1 pc : rpc_pipefs_event+0x54/0x120 [nfsd] lr : rpc_pipefs_event+0x48/0x120 [nfsd] Call trace: rpc_pipefs_event+0x54/0x120 [nfsd] blocking_notifier_call_chain rpc_fill_super get_tree_keyed rpc_fs_get_tree vfs_get_tree do_mount ksys_mount __arm64_sys_mount el0_svc_handler el0_svc The Linux kernel CVE team has assigned CVE-2021-47507 to this issue. Affected and fixed versions =========================== Issue introduced in 5.4.102 with commit 8677e99150b0 and fixed in 5.4.165 with commit f5734b1714ca Issue introduced in 5.10.20 with commit 7c7cb07d4aff and fixed in 5.10.85 with commit c520943a00ad Issue introduced in 5.12 with commit bd5ae9288d64 and fixed in 5.15.8 with commit 8bf902fee589 Issue introduced in 5.12 with commit bd5ae9288d64 and fixed in 5.16 with commit b10252c7ae9c Issue introduced in 5.11.3 with commit 4d41f65efeec Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2021-47507 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: fs/nfsd/nfs4recover.c fs/nfsd/nfsctl.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/f5734b1714ca355703e9ea8fb61d04beff1790b9 https://git.kernel.org/stable/c/c520943a00ad5015704969ad3304c956bcd49d25 https://git.kernel.org/stable/c/8bf902fee5893cfc2f04a698abab47629699ae9a https://git.kernel.org/stable/c/b10252c7ae9c9d7c90552f88b544a44ee773af64