| From bippy-5f407fcff5a0 Mon Sep 17 00:00:00 2001 |
| From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| To: <linux-cve-announce@vger.kernel.org> |
| Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org> |
| Subject: CVE-2021-47507: nfsd: Fix nsfd startup race (again) |
| |
| 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 8677e99150b0830d29cc1318b4cc559e176940bb and fixed in 5.4.165 with commit f5734b1714ca355703e9ea8fb61d04beff1790b9 |
| Issue introduced in 5.10.20 with commit 7c7cb07d4affcf41749234fe9dc4d90cd3959e32 and fixed in 5.10.85 with commit c520943a00ad5015704969ad3304c956bcd49d25 |
| Issue introduced in 5.12 with commit bd5ae9288d6451bd346a1b4a59d4fe7e62ba29b7 and fixed in 5.15.8 with commit 8bf902fee5893cfc2f04a698abab47629699ae9a |
| Issue introduced in 5.12 with commit bd5ae9288d6451bd346a1b4a59d4fe7e62ba29b7 and fixed in 5.16 with commit b10252c7ae9c9d7c90552f88b544a44ee773af64 |
| Issue introduced in 5.11.3 with commit 4d41f65efeec0a6da6088341203c81e49ebfcd90 |
| |
| 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 |