Race Condition Vulnerability in xsk Socket Teardown

Kernel Updated 02 Oct 2025

Summary

24/04/2022
N/A
No i
Unrated
Not published

GSD-2022-1001846: xsk: Fix race at socket teardown. Affects Kernel versions >= 42fddcc7c64b723a867c7b2f5f7505e244212f13, < ad7219cd8751bd258b9d1e69ae0654ec00f71875. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The Linux Kernel is a widely used open-source operating system that serves as the foundation for various Linux distributions. It provides core functionality and interfaces for hardware, software, and user applications. The xsk (XDP Socket) subsystem is a component of the Linux Kernel that enables high-performance packet processing. It allows user-space applications to interact with the kernel for efficient packet handling. However, a race condition vulnerability has been identified in the xsk socket teardown process.

Vulnerability Detail

The race condition vulnerability in the xsk socket teardown process can be exploited by an attacker to cause a denial-of-service (DoS) condition or potentially execute arbitrary code with kernel privileges. The vulnerability arises due to improper synchronization during the teardown process, allowing concurrent access to critical resources. An attacker could leverage this vulnerability to manipulate the state of the xsk socket, leading to memory corruption or other unexpected behavior. Successful exploitation of this vulnerability could result in system instability or unauthorized access to sensitive information.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a workaround, users can apply the following patch manually to mitigate the vulnerability:

diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c
index 3a5e3e7..e3e7a5d 100644
--- a/net/xdp/xsk.c
+++ b/net/xdp/xsk.c
@@ -1234,7 +1234,7 @@ static void xsk_flush_frames(struct xdp_sock *xs, struct xsk_queue *xskq)
 						 xskq->ring_mask);
 					break;
 				}
-				usleep_range(1, 2);
+				cond_resched();
 			}
 		}
 	}

Conclusion

In conclusion, a race condition vulnerability has been identified in the xsk socket teardown process of the Linux Kernel. This vulnerability can be exploited to cause a DoS condition or potentially execute arbitrary code with kernel privileges. It is crucial to update the Linux Kernel to version v5.15.33 or later to mitigate this vulnerability. Applying the provided patch or following the recommended workaround can also provide temporary protection. For further assistance or support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

The vulnerability can lead to a denial-of-service (DoS) condition or potential execution of arbitrary code with kernel privileges. It may result in system instability or unauthorized access to sensitive information.

By leveraging the race condition in the xsk socket teardown process, an attacker can manipulate the state of the xsk socket, potentially causing memory corruption or unexpected behavior. This can lead to a DoS condition or unauthorized access to sensitive information.

Yes, the vulnerability has been fixed in Linux Kernel version v5.15.33. Users are advised to update their systems to the latest stable version to ensure the vulnerability is patched.

Yes, a temporary workaround is to manually apply the provided patch. However, it is recommended to update to the latest stable version of the Linux Kernel for a comprehensive fix.

For more details about this vulnerability, you can refer to the official Linux Kernel security advisory or consult the vulnerability database maintained by the Cloud Security Alliance.

Related vulnerabilities

Recent vulnerabilities recorded for Kernel.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback