Vulnerability · Published May 21, 2024 · Assigned by Linux

CVE-2023-52803SUNRPC: Fix RPC client cleaned up the freed pipefs dentries

Medium 5.5

In plain English

A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 15% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS NVD)5.5Medium
Exploit odds (30 days)0.2%top 85.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

In the Linux kernel, the following vulnerability has been resolved: SUNRPC: Fix RPC client cleaned up the freed pipefs dentries RPC client pipefs dentries cleanup is in separated rpc_remove_pipedir() workqueue,which takes care about pipefs superblock locking. In some special scenarios, when kernel frees the pipefs sb of the current client and immediately alloctes a new pipefs sb, rpc_remove_pipedir function would misjudge the existence of pipefs sb which is not the one it used to hold. As a result, the rpc_remove_pipedir would clean the released freed pipefs dentries. To fix this issue, rpc_remove_pipedir should check whether the current pipefs sb is consistent with the original pipefs sb. This error can be catched by KASAN: ========================================================= [ 250.497700] BUG: KASAN: slab-use-after-free in dget_parent+0x195/0x200 [ 250.498315] Read of size 4 at addr ffff88800a2ab804 by task kworker/0:18/106503 [ 250.500549] Workqueue: events rpc_free_client_work [ 250.501001] Call Trace: [ 250.502880] kasan_report+0xb6/0xf0 [ 250.503209] ? dget_parent+0x195/0x200 [ 250.503561] dget_parent+0x195/0x200 [ 250.503897] ? __pfx_rpc_clntdir_depopulate+0x10/0x10 [ 250.504384] rpc_rmdir_depopulate+0x1b/0x90 [ 250.504781] rpc_remove_client_dir+0xf5/0x150 [ 250.505195] rpc_free_client_work+0xe4/0x230 [ 250.505598] process_one_work+0x8ee/0x13b0 ... [ 22.039056] Allocated by task 244: [ 22.039390] kasan_save_stack+0x22/0x50 [ 22.039758] kasan_set_track+0x25/0x30 [ 22.040109] __kasan_slab_alloc+0x59/0x70 [ 22.040487] kmem_cache_alloc_lru+0xf0/0x240 [ 22.040889] __d_alloc+0x31/0x8e0 [ 22.041207] d_alloc+0x44/0x1f0 [ 22.041514] __rpc_lookup_create_exclusive+0x11c/0x140 [ 22.041987] rpc_mkdir_populate.constprop.0+0x5f/0x110 [ 22.042459] rpc_create_client_dir+0x34/0x150 [ 22.042874] rpc_setup_pipedir_sb+0x102/0x1c0 [ 22.043284] rpc_client_register+0x136/0x4e0 [ 22.043689] rpc_new_client+0x911/0x1020 [ 22.044057] rpc_create_xprt+0xcb/0x370 [ 22.044417] rpc_create+0x36b/0x6c0 ... [ 22.049524] Freed by task 0: [ 22.049803] kasan_save_stack+0x22/0x50 [ 22.050165] kasan_set_track+0x25/0x30 [ 22.050520] kasan_save_free_info+0x2b/0x50 [ 22.050921] __kasan_slab_free+0x10e/0x1a0 [ 22.051306] kmem_cache_free+0xa5/0x390 [ 22.051667] rcu_core+0x62c/0x1930 [ 22.051995] __do_softirq+0x165/0x52a [ 22.052347] [ 22.052503] Last potentially related work creation: [ 22.052952] kasan_save_stack+0x22/0x50 [ 22.053313] __kasan_record_aux_stack+0x8e/0xa0 [ 22.053739] __call_rcu_common.constprop.0+0x6b/0x8b0 [ 22.054209] dentry_free+0xb2/0x140 [ 22.054540] __dentry_kill+0x3be/0x540 [ 22.054900] shrink_dentry_list+0x199/0x510 [ 22.055293] shrink_dcache_parent+0x190/0x240 [ 22.055703] do_one_tree+0x11/0x40 [ 22.056028] shrink_dcache_for_umount+0x61/0x140 [ 22.056461] generic_shutdown_super+0x70/0x590 [ 22.056879] kill_anon_super+0x3a/0x60 [ 22.057234] rpc_kill_sb+0x121/0x200

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8bpftool4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-abi-stablelists4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-core4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-cross-headers4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-debug4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-debug-core4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-debug-devel4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-debug-modules4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-debug-modules-extra4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-devel4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-doc4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-headers4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-modules4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-modules-extra4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-rt4.18.0-553.16.1.rt7.357.el8_10ALSA-2024:5102
AlmaLinux:8kernel-rt-core4.18.0-553.16.1.rt7.357.el8_10ALSA-2024:5102
AlmaLinux:8kernel-rt-debug4.18.0-553.16.1.rt7.357.el8_10ALSA-2024:5102
AlmaLinux:8kernel-rt-debug-core4.18.0-553.16.1.rt7.357.el8_10ALSA-2024:5102
AlmaLinux:8kernel-rt-debug-devel4.18.0-553.16.1.rt7.357.el8_10ALSA-2024:5102
AlmaLinux:8kernel-rt-debug-kvm4.18.0-553.16.1.rt7.357.el8_10ALSA-2024:5102
AlmaLinux:8kernel-rt-debug-modules4.18.0-553.16.1.rt7.357.el8_10ALSA-2024:5102
AlmaLinux:8kernel-rt-debug-modules-extra4.18.0-553.16.1.rt7.357.el8_10ALSA-2024:5102
AlmaLinux:8kernel-rt-devel4.18.0-553.16.1.rt7.357.el8_10ALSA-2024:5102
AlmaLinux:8kernel-rt-kvm4.18.0-553.16.1.rt7.357.el8_10ALSA-2024:5102
AlmaLinux:8kernel-rt-modules4.18.0-553.16.1.rt7.357.el8_10ALSA-2024:5102
AlmaLinux:8kernel-rt-modules-extra4.18.0-553.16.1.rt7.357.el8_10ALSA-2024:5102
AlmaLinux:8kernel-tools4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-tools-libs4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-tools-libs-devel4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-zfcpdump4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-zfcpdump-core4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-zfcpdump-devel4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-zfcpdump-modules4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-zfcpdump-modules-extra4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8perf4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8python3-perf4.18.0-553.16.1.el8_10ALSA-2024:5101
Debian:12linux6.1.64-1DEBIAN-CVE-2023-52803
Debian:13linux6.6.8-1DEBIAN-CVE-2023-52803
Debian:14linux6.6.8-1DEBIAN-CVE-2023-52803
Rocky Linux:8kernel0:4.18.0-553.16.1.el8_10.cloud.0.1RXSA-2024:5101
Rocky Linux:8kernel0:4.18.0-553.16.1.el8_10RLSA-2024:5101
Rocky Linux:8kernel-rt0:4.18.0-553.16.1.rt7.357.el8_10RLSA-2024:5102
Ubuntu:22.04:LTSlinux5.15.0-100.110UBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-aws5.15.0-1056.61UBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-azure5.15.0-1058.66UBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-azure-fde5.15.0-1058.66.1UBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-gcp5.15.0-1053.61UBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-gke5.15.0-1052.57UBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-gkeop5.15.0-1038.44UBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-ibm5.15.0-1048.51UBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-intel-iotg5.15.0-1050.56UBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-kvm5.15.0-1052.57UBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-lowlatency5.15.0-100.110UBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-nvidia5.15.0-1046.46UBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-nvidia-6.56.5.0-1014.14UBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-nvidia-tegra5.15.0-1025.25UBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-nvidia-tegra-igx5.15.0-1012.12UBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-oracle5.15.0-1053.59UBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-raspi5.15.0-1048.51UBUNTU-CVE-2023-52803
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2023-52803
Ubuntu:22.04:LTSlinux-xilinx-zynqmp5.15.0-1030.34UBUNTU-CVE-2023-52803

Affected products (as reported)

VendorProductVersions
Linux Linux 0157d021d23a087eecfa830502f81cfe843f0d16 – before 17866066b8ac1cc38fb449670bc15dc9fee4b40a0157d021d23a087eecfa830502f81cfe843f0d16 – before 7d61d1da2ed1f682c41cae0c8d4719cdaccee5c50157d021d23a087eecfa830502f81cfe843f0d16 – before dedf2a0eb9448ae73b270743e6ea9b108189df460157d021d23a087eecfa830502f81cfe843f0d16 – before 194454afa6aa9d6ed74f0c57127bc8beb27c20df0157d021d23a087eecfa830502f81cfe843f0d16 – before 7749fd2dbef72a52b5c9ffdbf877691950ed46800157d021d23a087eecfa830502f81cfe843f0d16 – before 1cdb52ffd6600a37bd355d8dce58ecd03e55e6180157d021d23a087eecfa830502f81cfe843f0d16 – before cc2e7ebbeb1d0601f7f3c8d93b78fcc03a95e44a0157d021d23a087eecfa830502f81cfe843f0d16 – before bfca5fb4e97c46503ddfc582335917b0cc228264
Linux Linux 3.4

References