CVE Vulnerabilities

CVE-2026-23394

Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

Published: Mar 25, 2026 | Modified: Jun 17, 2026
CVSS 3.x
4.7
MEDIUM
Source:
NVD
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
CVSS 2.x
RedHat/V2
RedHat/V3
5.5 MODERATE
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Ubuntu
MEDIUM
root.io logo minimus.io logo echo.ai logo

In the Linux kernel, the following vulnerability has been resolved:

af_unix: Give up GC if MSG_PEEK intervened.

Igor Ushakov reported that GC purged the receive queue of an alive socket due to a race with MSG_PEEK with a nice repro.

This is the exact same issue previously fixed by commit cbcf01128d0a (af_unix: fix garbage collect vs MSG_PEEK).

After GC was replaced with the current algorithm, the cited commit removed the locking dance in unix_peek_fds() and reintroduced the same issue.

The problem is that MSG_PEEK bumps a file refcount without interacting with GC.

Consider an SCC containing sk-A and sk-B, where sk-A is close()d but can be recv()ed via sk-B.

The bad thing happens if sk-A is recv()ed with MSG_PEEK from sk-B and sk-B is close()d while GC is checking unix_vertex_dead() for sk-A and sk-B.

GC thread User thread


unix_vertex_dead(sk-A) -> true <——.

                 `------   recv(sk-B, MSG_PEEK)
          invalidate !!    -> sk-As file refcount : 1 -> 2

                           close(sk-B)
                           -> sk-Bs file refcount : 2 -> 1

unix_vertex_dead(sk-B) -> true

Initially, sk-As file refcount is 1 by the inflight fd in sk-B recvq. GC thinks sk-A is dead because the file refcount is the same as the number of its inflight fds.

However, sk-As file refcount is bumped silently by MSG_PEEK, which invalidates the previous evaluation.

At this moment, sk-Bs file refcount is 2; one by the open fd, and one by the inflight fd in sk-A. The subsequent close() releases one refcount by the former.

Finally, GC incorrectly concludes that both sk-A and sk-B are dead.

One option is to restore the locking dance in unix_peek_fds(), but we can resolve this more elegantly thanks to the new algorithm.

The point is that the issue does not occur without the subsequent close() and we actually do not need to synchronise MSG_PEEK with the dead SCC detection.

When the issue occurs, close() and GC touch the same file refcount. If GC sees the refcount being decremented by close(), it can just give up garbage-collecting the SCC.

Therefore, we only need to signal the race during MSG_PEEK with a proper memory barrier to make it visible to the GC.

Lets use seqcount_t to notify GC when MSG_PEEK occurs and let it defer the SCC to the next run.

This way no locking is needed on the MSG_PEEK side, and we can avoid imposing a penalty on every MSG_PEEK unnecessarily.

Note that we can retry within unix_scc_dead() if MSG_PEEK is detected, but we do not do so to avoid hung task splat from abusive MSG_PEEK calls.

Weakness

The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently.

Affected Software

NameVendorStart VersionEnd Version
Linux_kernelLinux6.1.141 (including)6.2 (excluding)
Linux_kernelLinux6.6.93 (including)6.7 (excluding)
Linux_kernelLinux6.10.1 (including)6.18.23 (excluding)
Linux_kernelLinux6.19 (including)6.19.10 (excluding)
Linux_kernelLinux6.10 (including)6.10 (including)
Linux_kernelLinux7.0-rc1 (including)7.0-rc1 (including)
Linux_kernelLinux7.0-rc2 (including)7.0-rc2 (including)
Linux_kernelLinux7.0-rc3 (including)7.0-rc3 (including)
Linux_kernelLinux7.0-rc4 (including)7.0-rc4 (including)
Linux_kernelLinux7.0-rc5 (including)7.0-rc5 (including)
Linux_kernelLinux7.0-rc6 (including)7.0-rc6 (including)
Linux_kernelLinux7.0-rc7 (including)7.0-rc7 (including)
LinuxUbuntunoble*
LinuxUbuntuquesting*
LinuxUbuntuupstream*
Linux-allwinner-5.19Ubuntujammy*
Linux-allwinner-5.19Ubuntuupstream*
Linux-awsUbuntunoble*
Linux-awsUbuntuquesting*
Linux-awsUbuntuupstream*
Linux-aws-5.0Ubuntubionic*
Linux-aws-5.0Ubuntuesm-infra/bionic*
Linux-aws-5.0Ubuntuupstream*
Linux-aws-5.11Ubuntuesm-infra/focal*
Linux-aws-5.11Ubuntufocal*
Linux-aws-5.11Ubuntuupstream*
Linux-aws-5.13Ubuntuesm-infra/focal*
Linux-aws-5.13Ubuntufocal*
Linux-aws-5.13Ubuntuupstream*
Linux-aws-5.15Ubuntuupstream*
Linux-aws-5.19Ubuntujammy*
Linux-aws-5.19Ubuntuupstream*
Linux-aws-5.3Ubuntubionic*
Linux-aws-5.3Ubuntuesm-infra/bionic*
Linux-aws-5.3Ubuntuupstream*
Linux-aws-5.4Ubuntuupstream*
Linux-aws-5.8Ubuntuesm-infra/focal*
Linux-aws-5.8Ubuntufocal*
Linux-aws-5.8Ubuntuupstream*
Linux-aws-6.14Ubuntunoble*
Linux-aws-6.14Ubuntuupstream*
Linux-aws-6.17Ubuntunoble*
Linux-aws-6.17Ubuntuupstream*
Linux-aws-6.2Ubuntujammy*
Linux-aws-6.2Ubuntuupstream*
Linux-aws-6.5Ubuntujammy*
Linux-aws-6.5Ubuntuupstream*
Linux-aws-6.8Ubuntujammy*
Linux-aws-6.8Ubuntuupstream*
Linux-aws-fipsUbuntufips-updates/noble*
Linux-aws-fipsUbuntutrusty*
Linux-aws-fipsUbuntuupstream*
Linux-aws-fipsUbuntuxenial*
Linux-aws-hweUbuntuupstream*
Linux-azureUbuntubionic*
Linux-azureUbuntuesm-infra/bionic*
Linux-azureUbuntunoble*
Linux-azureUbuntuquesting*
Linux-azureUbuntuupstream*
Linux-azure-4.15Ubuntuupstream*
Linux-azure-5.11Ubuntuesm-infra/focal*
Linux-azure-5.11Ubuntufocal*
Linux-azure-5.11Ubuntuupstream*
Linux-azure-5.13Ubuntuesm-infra/focal*
Linux-azure-5.13Ubuntufocal*
Linux-azure-5.13Ubuntuupstream*
Linux-azure-5.15Ubuntuupstream*
Linux-azure-5.19Ubuntujammy*
Linux-azure-5.19Ubuntuupstream*
Linux-azure-5.3Ubuntubionic*
Linux-azure-5.3Ubuntuesm-infra/bionic*
Linux-azure-5.3Ubuntuupstream*
Linux-azure-5.4Ubuntuupstream*
Linux-azure-5.8Ubuntuesm-infra/focal*
Linux-azure-5.8Ubuntufocal*
Linux-azure-5.8Ubuntuupstream*
Linux-azure-6.11Ubuntunoble*
Linux-azure-6.11Ubuntuupstream*
Linux-azure-6.14Ubuntunoble*
Linux-azure-6.14Ubuntuupstream*
Linux-azure-6.17Ubuntunoble*
Linux-azure-6.17Ubuntuupstream*
Linux-azure-6.2Ubuntujammy*
Linux-azure-6.2Ubuntuupstream*
Linux-azure-6.5Ubuntujammy*
Linux-azure-6.5Ubuntuupstream*
Linux-azure-6.8Ubuntujammy*
Linux-azure-6.8Ubuntuupstream*
Linux-azure-edgeUbuntubionic*
Linux-azure-edgeUbuntuesm-infra/bionic*
Linux-azure-edgeUbuntuupstream*
Linux-azure-fdeUbuntuesm-infra/focal*
Linux-azure-fdeUbuntufocal*
Linux-azure-fdeUbuntunoble*
Linux-azure-fdeUbuntuquesting*
Linux-azure-fdeUbuntuupstream*
Linux-azure-fde-5.15Ubuntuupstream*
Linux-azure-fde-5.19Ubuntujammy*
Linux-azure-fde-5.19Ubuntuupstream*
Linux-azure-fde-6.14Ubuntunoble*
Linux-azure-fde-6.14Ubuntuupstream*
Linux-azure-fde-6.17Ubuntunoble*
Linux-azure-fde-6.17Ubuntuupstream*
Linux-azure-fde-6.2Ubuntujammy*
Linux-azure-fde-6.2Ubuntuupstream*
Linux-azure-fde-6.8Ubuntujammy*
Linux-azure-fde-6.8Ubuntuupstream*
Linux-azure-fipsUbuntufips-updates/noble*
Linux-azure-fipsUbuntutrusty*
Linux-azure-fipsUbuntuupstream*
Linux-azure-fipsUbuntuxenial*
Linux-azure-nvidiaUbuntuupstream*
Linux-azure-nvidia-6.14Ubuntunoble*
Linux-azure-nvidia-6.14Ubuntuupstream*
Linux-bluefieldUbuntuupstream*
Linux-fipsUbuntufips-updates/noble*
Linux-fipsUbuntuupstream*
Linux-gcpUbuntubionic*
Linux-gcpUbuntuesm-infra/bionic*
Linux-gcpUbuntunoble*
Linux-gcpUbuntuquesting*
Linux-gcpUbuntuupstream*
Linux-gcp-4.15Ubuntuupstream*
Linux-gcp-5.11Ubuntuesm-infra/focal*
Linux-gcp-5.11Ubuntufocal*
Linux-gcp-5.11Ubuntuupstream*
Linux-gcp-5.13Ubuntuesm-infra/focal*
Linux-gcp-5.13Ubuntufocal*
Linux-gcp-5.13Ubuntuupstream*
Linux-gcp-5.15Ubuntuupstream*
Linux-gcp-5.19Ubuntujammy*
Linux-gcp-5.19Ubuntuupstream*
Linux-gcp-5.3Ubuntubionic*
Linux-gcp-5.3Ubuntuesm-infra/bionic*
Linux-gcp-5.3Ubuntuupstream*
Linux-gcp-5.4Ubuntuupstream*
Linux-gcp-5.8Ubuntuesm-infra/focal*
Linux-gcp-5.8Ubuntufocal*
Linux-gcp-5.8Ubuntuupstream*
Linux-gcp-6.11Ubuntunoble*
Linux-gcp-6.11Ubuntuupstream*
Linux-gcp-6.14Ubuntunoble*
Linux-gcp-6.14Ubuntuupstream*
Linux-gcp-6.17Ubuntunoble*
Linux-gcp-6.17Ubuntuupstream*
Linux-gcp-6.2Ubuntujammy*
Linux-gcp-6.2Ubuntuupstream*
Linux-gcp-6.5Ubuntujammy*
Linux-gcp-6.5Ubuntuupstream*
Linux-gcp-6.8Ubuntujammy*
Linux-gcp-6.8Ubuntuupstream*
Linux-gcp-fipsUbuntufips-updates/noble*
Linux-gcp-fipsUbuntutrusty*
Linux-gcp-fipsUbuntuupstream*
Linux-gcp-fipsUbuntuxenial*
Linux-gkeUbuntuesm-infra/focal*
Linux-gkeUbuntufocal*
Linux-gkeUbuntunoble*
Linux-gkeUbuntuupstream*
Linux-gkeUbuntuxenial*
Linux-gke-4.15Ubuntubionic*
Linux-gke-4.15Ubuntuesm-infra/bionic*
Linux-gke-4.15Ubuntuupstream*
Linux-gke-5.15Ubuntuesm-infra/focal*
Linux-gke-5.15Ubuntufocal*
Linux-gke-5.15Ubuntuupstream*
Linux-gke-5.4Ubuntubionic*
Linux-gke-5.4Ubuntuesm-infra/bionic*
Linux-gke-5.4Ubuntuupstream*
Linux-gkeopUbuntuesm-infra/focal*
Linux-gkeopUbuntufocal*
Linux-gkeopUbuntunoble*
Linux-gkeopUbuntuupstream*
Linux-gkeop-5.15Ubuntuesm-infra/focal*
Linux-gkeop-5.15Ubuntufocal*
Linux-gkeop-5.15Ubuntuupstream*
Linux-gkeop-5.4Ubuntubionic*
Linux-gkeop-5.4Ubuntuesm-infra/bionic*
Linux-gkeop-5.4Ubuntuupstream*
Linux-hweUbuntubionic*
Linux-hweUbuntuesm-infra/bionic*
Linux-hweUbuntuupstream*
Linux-hwe-5.11Ubuntuesm-infra/focal*
Linux-hwe-5.11Ubuntufocal*
Linux-hwe-5.11Ubuntuupstream*
Linux-hwe-5.13Ubuntuesm-infra/focal*
Linux-hwe-5.13Ubuntufocal*
Linux-hwe-5.13Ubuntuupstream*
Linux-hwe-5.15Ubuntuupstream*
Linux-hwe-5.19Ubuntujammy*
Linux-hwe-5.19Ubuntuupstream*
Linux-hwe-5.4Ubuntuupstream*
Linux-hwe-5.8Ubuntuesm-infra/focal*
Linux-hwe-5.8Ubuntufocal*
Linux-hwe-5.8Ubuntuupstream*
Linux-hwe-6.11Ubuntunoble*
Linux-hwe-6.11Ubuntuupstream*
Linux-hwe-6.14Ubuntunoble*
Linux-hwe-6.14Ubuntuupstream*
Linux-hwe-6.17Ubuntunoble*
Linux-hwe-6.17Ubuntuupstream*
Linux-hwe-6.2Ubuntujammy*
Linux-hwe-6.2Ubuntuupstream*
Linux-hwe-6.5Ubuntujammy*
Linux-hwe-6.5Ubuntuupstream*
Linux-hwe-6.8Ubuntujammy*
Linux-hwe-6.8Ubuntuupstream*
Linux-hwe-7.0Ubuntuupstream*
Linux-hwe-edgeUbuntubionic*
Linux-hwe-edgeUbuntuesm-infra-legacy/xenial*
Linux-hwe-edgeUbuntuesm-infra/bionic*
Linux-hwe-edgeUbuntuesm-infra/xenial*
Linux-hwe-edgeUbuntuupstream*
Linux-hwe-edgeUbuntuxenial*
Linux-ibmUbuntunoble*
Linux-ibmUbuntuupstream*
Linux-ibm-5.15Ubuntuupstream*
Linux-ibm-5.4Ubuntuupstream*
Linux-ibm-6.8Ubuntujammy*
Linux-ibm-6.8Ubuntuupstream*
Linux-intel-5.13Ubuntuesm-infra/focal*
Linux-intel-5.13Ubuntufocal*
Linux-intel-5.13Ubuntuupstream*
Linux-intel-iot-realtimeUbuntujammy*
Linux-intel-iot-realtimeUbuntuupstream*
Linux-intel-iotgUbuntuupstream*
Linux-intel-iotg-5.15Ubuntuupstream*
Linux-iotUbuntuupstream*
Linux-kvmUbuntuupstream*
Linux-lowlatencyUbuntunoble*
Linux-lowlatencyUbuntuupstream*
Linux-lowlatency-hwe-5.15Ubuntuupstream*
Linux-lowlatency-hwe-5.19Ubuntujammy*
Linux-lowlatency-hwe-5.19Ubuntuupstream*
Linux-lowlatency-hwe-6.11Ubuntunoble*
Linux-lowlatency-hwe-6.11Ubuntuupstream*
Linux-lowlatency-hwe-6.2Ubuntujammy*
Linux-lowlatency-hwe-6.2Ubuntuupstream*
Linux-lowlatency-hwe-6.5Ubuntujammy*
Linux-lowlatency-hwe-6.5Ubuntuupstream*
Linux-lowlatency-hwe-6.8Ubuntujammy*
Linux-lowlatency-hwe-6.8Ubuntuupstream*
Linux-lts-xenialUbuntuupstream*
Linux-nvidiaUbuntunoble*
Linux-nvidiaUbuntuupstream*
Linux-nvidia-6.11Ubuntunoble*
Linux-nvidia-6.11Ubuntuupstream*
Linux-nvidia-6.17Ubuntunoble*
Linux-nvidia-6.17Ubuntuupstream*
Linux-nvidia-6.2Ubuntujammy*
Linux-nvidia-6.2Ubuntuupstream*
Linux-nvidia-6.5Ubuntujammy*
Linux-nvidia-6.5Ubuntuupstream*
Linux-nvidia-6.8Ubuntujammy*
Linux-nvidia-6.8Ubuntuupstream*
Linux-nvidia-7.0Ubuntuupstream*
Linux-nvidia-bosUbuntuupstream*
Linux-nvidia-bos-7.0Ubuntuupstream*
Linux-nvidia-lowlatencyUbuntunoble*
Linux-nvidia-lowlatencyUbuntuupstream*
Linux-nvidia-tegraUbuntunoble*
Linux-nvidia-tegraUbuntuupstream*
Linux-nvidia-tegra-5.15Ubuntuupstream*
Linux-nvidia-tegra-igxUbuntuupstream*
Linux-oemUbuntubionic*
Linux-oemUbuntuesm-infra/bionic*
Linux-oemUbuntuupstream*
Linux-oemUbuntuxenial*
Linux-oem-5.10Ubuntuesm-infra/focal*
Linux-oem-5.10Ubuntufocal*
Linux-oem-5.10Ubuntuupstream*
Linux-oem-5.13Ubuntuesm-infra/focal*
Linux-oem-5.13Ubuntufocal*
Linux-oem-5.13Ubuntuupstream*
Linux-oem-5.14Ubuntuesm-infra/focal*
Linux-oem-5.14Ubuntufocal*
Linux-oem-5.14Ubuntuupstream*
Linux-oem-5.17Ubuntujammy*
Linux-oem-5.17Ubuntuupstream*
Linux-oem-5.6Ubuntuesm-infra/focal*
Linux-oem-5.6Ubuntufocal*
Linux-oem-5.6Ubuntuupstream*
Linux-oem-6.0Ubuntujammy*
Linux-oem-6.0Ubuntuupstream*
Linux-oem-6.1Ubuntujammy*
Linux-oem-6.1Ubuntuupstream*
Linux-oem-6.11Ubuntunoble*
Linux-oem-6.11Ubuntuupstream*
Linux-oem-6.14Ubuntunoble*
Linux-oem-6.14Ubuntuupstream*
Linux-oem-6.17Ubuntunoble*
Linux-oem-6.17Ubuntuupstream*
Linux-oem-6.5Ubuntujammy*
Linux-oem-6.5Ubuntuupstream*
Linux-oem-6.8Ubuntunoble*
Linux-oem-6.8Ubuntuupstream*
Linux-oem-7.0Ubuntuupstream*
Linux-oracleUbuntunoble*
Linux-oracleUbuntuquesting*
Linux-oracleUbuntuupstream*
Linux-oracle-5.0Ubuntubionic*
Linux-oracle-5.0Ubuntuesm-infra/bionic*
Linux-oracle-5.0Ubuntuupstream*
Linux-oracle-5.11Ubuntuesm-infra/focal*
Linux-oracle-5.11Ubuntufocal*
Linux-oracle-5.11Ubuntuupstream*
Linux-oracle-5.13Ubuntuesm-infra/focal*
Linux-oracle-5.13Ubuntufocal*
Linux-oracle-5.13Ubuntuupstream*
Linux-oracle-5.15Ubuntuupstream*
Linux-oracle-5.3Ubuntubionic*
Linux-oracle-5.3Ubuntuesm-infra/bionic*
Linux-oracle-5.3Ubuntuupstream*
Linux-oracle-5.4Ubuntuupstream*
Linux-oracle-5.8Ubuntuesm-infra/focal*
Linux-oracle-5.8Ubuntufocal*
Linux-oracle-5.8Ubuntuupstream*
Linux-oracle-6.14Ubuntunoble*
Linux-oracle-6.14Ubuntuupstream*
Linux-oracle-6.17Ubuntunoble*
Linux-oracle-6.17Ubuntuupstream*
Linux-oracle-6.5Ubuntujammy*
Linux-oracle-6.5Ubuntuupstream*
Linux-oracle-6.8Ubuntujammy*
Linux-oracle-6.8Ubuntuupstream*
Linux-raspiUbuntunoble*
Linux-raspiUbuntuquesting*
Linux-raspiUbuntuupstream*
Linux-raspi-5.4Ubuntuupstream*
Linux-raspi-realtimeUbuntunoble*
Linux-raspi-realtimeUbunturealtime/noble*
Linux-raspi-realtimeUbuntuupstream*
Linux-raspi2Ubuntubionic*
Linux-raspi2Ubuntuesm-infra/focal*
Linux-raspi2Ubuntufocal*
Linux-raspi2Ubuntuupstream*
Linux-raspi2Ubuntuxenial*
Linux-realtimeUbuntujammy*
Linux-realtimeUbuntunoble*
Linux-realtimeUbuntuquesting*
Linux-realtimeUbunturealtime/noble*
Linux-realtimeUbuntuupstream*
Linux-realtime-6.14Ubunturealtime/noble*
Linux-realtime-6.14Ubuntuupstream*
Linux-realtime-6.17Ubunturealtime/noble*
Linux-realtime-6.17Ubuntuupstream*
Linux-realtime-6.8Ubunturealtime/jammy*
Linux-realtime-6.8Ubuntuupstream*
Linux-riscvUbuntuesm-infra/focal*
Linux-riscvUbuntufocal*
Linux-riscvUbuntujammy*
Linux-riscvUbuntunoble*
Linux-riscvUbuntuquesting*
Linux-riscvUbuntuupstream*
Linux-riscv-5.11Ubuntuesm-infra/focal*
Linux-riscv-5.11Ubuntufocal*
Linux-riscv-5.11Ubuntuupstream*
Linux-riscv-5.15Ubuntuupstream*
Linux-riscv-5.19Ubuntujammy*
Linux-riscv-5.19Ubuntuupstream*
Linux-riscv-5.8Ubuntuesm-infra/focal*
Linux-riscv-5.8Ubuntufocal*
Linux-riscv-5.8Ubuntuupstream*
Linux-riscv-6.14Ubuntunoble*
Linux-riscv-6.14Ubuntuupstream*
Linux-riscv-6.17Ubuntunoble*
Linux-riscv-6.17Ubuntuupstream*
Linux-riscv-6.5Ubuntujammy*
Linux-riscv-6.5Ubuntuupstream*
Linux-riscv-6.8Ubuntujammy*
Linux-riscv-6.8Ubuntuupstream*
Linux-starfive-5.19Ubuntujammy*
Linux-starfive-5.19Ubuntuupstream*
Linux-starfive-6.2Ubuntujammy*
Linux-starfive-6.2Ubuntuupstream*
Linux-starfive-6.5Ubuntujammy*
Linux-starfive-6.5Ubuntuupstream*
Linux-xilinxUbuntunoble*
Linux-xilinxUbuntuupstream*
Linux-xilinx-zynqmpUbuntuupstream*

Extended Description

A race condition occurs within concurrent environments, and it is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc. A race condition violates these properties, which are closely related:

A race condition exists when an “interfering code sequence” can still access the shared resource, violating exclusivity. The interfering code sequence could be “trusted” or “untrusted.” A trusted interfering code sequence occurs within the product; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable product.

Potential Mitigations

  • Minimize the usage of shared resources in order to remove as much complexity as possible from the control flow and to reduce the likelihood of unexpected conditions occurring.
  • Additionally, this will minimize the amount of synchronization necessary and may even help to reduce the likelihood of a denial of service where an attacker may be able to repeatedly trigger a critical section (CWE-400).

References