Vulnerability · Published May 21, 2024 · Assigned by Linux

CVE-2023-52836locking/ww_mutex/test: Fix potential workqueue corruption

High 7.8

In plain English

A high-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.3% (higher than 17% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS NVD)7.8High
Exploit odds (30 days)0.3%top 82.8% 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: locking/ww_mutex/test: Fix potential workqueue corruption In some cases running with the test-ww_mutex code, I was seeing odd behavior where sometimes it seemed flush_workqueue was returning before all the work threads were finished. Often this would cause strange crashes as the mutexes would be freed while they were being used. Looking at the code, there is a lifetime problem as the controlling thread that spawns the work allocates the "struct stress" structures that are passed to the workqueue threads. Then when the workqueue threads are finished, they free the stress struct that was passed to them. Unfortunately the workqueue work_struct node is in the stress struct. Which means the work_struct is freed before the work thread returns and while flush_workqueue is waiting. It seems like a better idea to have the controlling thread both allocate and free the stress structures, so that we can be sure we don't corrupt the workqueue by freeing the structure prematurely. So this patch reworks the test to do so, and with this change I no longer see the early flush_workqueue returns.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12linux6.1.64-1DEBIAN-CVE-2023-52836
Debian:13linux6.6.8-1DEBIAN-CVE-2023-52836
Debian:14linux6.6.8-1DEBIAN-CVE-2023-52836
Ubuntu:22.04:LTSlinux5.15.0-100.110UBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-aws5.15.0-1056.61UBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-azure5.15.0-1058.66UBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-azure-fde5.15.0-1058.66.1UBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-gcp5.15.0-1053.61UBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-gke5.15.0-1052.57UBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-gkeop5.15.0-1038.44UBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-ibm5.15.0-1048.51UBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-intel-iotg5.15.0-1050.56UBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-kvm5.15.0-1052.57UBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-lowlatency5.15.0-100.110UBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-nvidia5.15.0-1046.46UBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-nvidia-6.56.5.0-1014.14UBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-nvidia-tegra5.15.0-1025.25UBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-nvidia-tegra-igx5.15.0-1012.12UBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-oracle5.15.0-1053.59UBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-raspi5.15.0-1048.51UBUNTU-CVE-2023-52836
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2023-52836
Ubuntu:22.04:LTSlinux-xilinx-zynqmp5.15.0-1030.34UBUNTU-CVE-2023-52836

Affected products (as reported)

VendorProductVersions
Linux Linux 2a0c11282881875dc44f166a20eedf0d866dd0ef – before d4d37c9e6a4dbcca958dabd99216550525c7e3892a0c11282881875dc44f166a20eedf0d866dd0ef – before d8267cabbe1bed15ccf8b0e684c528bf8eeef7152a0c11282881875dc44f166a20eedf0d866dd0ef – before dcd85e3c929368076a7592b27f541e0da8b427f52a0c11282881875dc44f166a20eedf0d866dd0ef – before 9ed2d68b3925145f5f51c46559484881d6082f752a0c11282881875dc44f166a20eedf0d866dd0ef – before e89d0ed45a419c485bae999426ecf92697cbdda32a0c11282881875dc44f166a20eedf0d866dd0ef – before c56df79d68677cf062da1b6e3b33e74299a92dfc2a0c11282881875dc44f166a20eedf0d866dd0ef – before e36407713163363e65566e7af0abe207d5f59a0c2a0c11282881875dc44f166a20eedf0d866dd0ef – before 304a2c4aad0fff887ce493e4197bf9cbaf394479
Linux Linux 4.11

References