Segmentation Fault Risk in Linux Kernel due to rseq_cs Mismanagement
Summary
CVE-2025-38067: In the Linux kernel, the following vulnerability has been resolved: rseq: Fix segfault on registration when rseq_cs is non-zero The rseq_cs field is documented as being set to 0 by user-space prior to registration, howev... Affects linux versions 5.10.103-1 – 6.9.9-1. No fix is published. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
The Linux kernel is the core component of many operating systems, providing essential services for all other parts of the system. It manages hardware resources, system calls, and process management. The kernel's rseq (restartable sequences) feature allows user-space applications to perform certain operations atomically. However, a vulnerability has been identified in the rseq registration process, which can lead to segmentation faults if the rseq_cs field is not properly initialized.
Vulnerability Detail
In the Linux kernel, the rseq_cs field is expected to be set to 0 by user-space applications before registration. However, this requirement is not enforced by the kernel, leading to potential segmentation faults when returning to user-space if the rseq_cs field contains an invalid pointer. This issue arises particularly in scenarios where older versions of glibc reuse the rseq area of previous threads without clearing the rseq_cs field, causing unexpected behavior and crashes.
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 temporary workaround, ensure that the rseq_cs field is explicitly set to 0 before registration in your application code. This can be done by adding the following line before the registration call: 'rseq_cs = 0;'. This will prevent segmentation faults until the kernel is updated.
Conclusion
The vulnerability identified in the Linux kernel regarding the rseq_cs field poses a significant risk of segmentation faults in user-space applications. It is crucial to update the kernel to the patched version to mitigate this risk. Additionally, implementing the suggested workaround can provide temporary relief until the update is applied.
See every vulnerability recorded for linux →
FAQ
The rseq (restartable sequences) feature allows user-space applications to perform operations atomically, improving performance in multi-threaded environments.
If your application uses the rseq feature and does not properly initialize the rseq_cs field, it may experience segmentation faults, leading to crashes.
Yes, if the application crashes due to a segmentation fault, there is a potential risk of data loss, especially if unsaved changes are present.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Visit Vulert Scanner to check your application without needing to sign up.
If immediate updates are not possible, ensure that the rseq_cs field is set to 0 before registration in your application code as a temporary workaround.
Related vulnerabilities
Recent vulnerabilities recorded for linux.