CVE-2023-52836

locking/ww_mutex/test: Fix potential workqueue corruption

No CVSS score yet EPSS 0.26%

Published 21 May 2024 Updated 11 May 2026 CNA: Linux

Check your servers for CVE-2023-52836

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2023-52836 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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.

Exploitation

EPSS 0.26%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 18.1% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 22 May 2024):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 2a0c11282881875dc44f166a20eedf0d866dd0ef, before d4d37c9e6a4dbcca958dabd99216550525c7e389
affected from 2a0c11282881875dc44f166a20eedf0d866dd0ef, before d8267cabbe1bed15ccf8b0e684c528bf8eeef715
affected from 2a0c11282881875dc44f166a20eedf0d866dd0ef, before dcd85e3c929368076a7592b27f541e0da8b427f5
affected from 2a0c11282881875dc44f166a20eedf0d866dd0ef, before 9ed2d68b3925145f5f51c46559484881d6082f75
affected from 2a0c11282881875dc44f166a20eedf0d866dd0ef, before e89d0ed45a419c485bae999426ecf92697cbdda3
affected from 2a0c11282881875dc44f166a20eedf0d866dd0ef, before c56df79d68677cf062da1b6e3b33e74299a92dfc
affected from 2a0c11282881875dc44f166a20eedf0d866dd0ef, before e36407713163363e65566e7af0abe207d5f59a0c
affected from 2a0c11282881875dc44f166a20eedf0d866dd0ef, before 304a2c4aad0fff887ce493e4197bf9cbaf394479
affected from 2a0c11282881875dc44f166a20eedf0d866dd0ef, before bccdd808902f8c677317cec47c306e42b93b849e
Other versions: unaffected
Linux
affected 4.11
unaffected before 4.11
unaffected from 4.14.331 up to and including 4.14.*
unaffected from 4.19.300 up to and including 4.19.*
unaffected from 5.4.262 up to and including 5.4.*
unaffected from 5.10.202 up to and including 5.10.*
unaffected from 5.15.140 up to and including 5.15.*
unaffected from 6.1.64 up to and including 6.1.*
unaffected from 6.5.13 up to and including 6.5.*
unaffected from 6.6.3 up to and including 6.6.*
unaffected 6.7 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2023-52836 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2023-52836

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2023-52836
trivy image --scanners vuln IMAGE | grep CVE-2023-52836

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2023-52836 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.