arm64/gcs: Fix error handling in arch_set_shadow_stack_status()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.18.146.19.47.0In the Linux kernel, the following vulnerability has been resolved:
arm64/gcs: Fix error handling in arch_set_shadow_stack_status()
alloc_gcs() returns an error-encoded pointer on failure, which comes from do_mmap(), not NULL.
The current NULL check fails to detect errors, which could lead to using an invalid GCS address.
Use IS_ERR_VALUE() to properly detect errors, consistent with the check in gcs_alloc_thread_stack().
From the CVE record · Linux
The Linux kernel's arm64 GCS shadow-stack status handling fails to recognize an error-encoded pointer when allocation fails. This could lead to use of an invalid GCS address. The input does not specify an attacker action or whether exploitation requires network access, authentication, or user interaction.
Engineers running Linux kernels with arm64 GCS support should check their kernel versions; affected versions are not specified.