Vulnerability in Kernel: x86/entry: Clear X86_FEATURE_SMAP when CONFIG_X86_SMAP=n

Kernel Updated 02 Oct 2025

Summary

19/10/2021
N/A
No i
Unrated
Not published

GSD-2021-1001680: x86/entry: Clear X86_FEATURE_SMAP when CONFIG_X86_SMAP=n. Affects Kernel versions >= 3c73b81a9164d0c1b6379d6672d2772a9e95168e, < 4e9ec1c65da98c293f75d83755dfa5e03075a6d0. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The Kernel is a crucial component of the Linux operating system that acts as a bridge between the hardware and software layers. It provides essential functionalities, such as managing system resources, handling device drivers, and facilitating communication between different software components. This vulnerability specifically affects the x86/entry module of the Kernel. The x86/entry module is responsible for handling system calls and interrupts on x86-based systems. The vulnerability arises when the CONFIG_X86_SMAP configuration option is disabled, but the X86_FEATURE_SMAP flag is not cleared properly. This misconfiguration can potentially lead to security issues.

Vulnerability Detail

The vulnerability occurs due to a misconfiguration in the x86/entry module of the Kernel. When the CONFIG_X86_SMAP configuration option is disabled, the X86_FEATURE_SMAP flag should also be cleared to ensure proper security. However, this clearing process is not implemented correctly, leaving the flag enabled even when it should be disabled. This vulnerability can be exploited by attackers to bypass the SMAP (Supervisor Mode Access Prevention) protection mechanism, which is designed to prevent unauthorized access to user-space memory from kernel mode. By exploiting this vulnerability, an attacker may gain unauthorized access to sensitive information or execute arbitrary code with elevated privileges.

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

If updating the Kernel is not immediately feasible, a temporary workaround can be applied. The workaround involves manually clearing the X86_FEATURE_SMAP flag when the CONFIG_X86_SMAP configuration option is disabled. This can be achieved by modifying the relevant code in the x86/entry module. Below is an example of the code modification:

// Before
if (IS_ENABLED(CONFIG_X86_SMAP))
	x86_capability[0] |= X86_FEATURE_SMAP;

// After
if (!IS_ENABLED(CONFIG_X86_SMAP))
	x86_capability[0] &= ~X86_FEATURE_SMAP;

Conclusion

The vulnerability in the Kernel's x86/entry module, which fails to clear the X86_FEATURE_SMAP flag when the CONFIG_X86_SMAP configuration option is disabled, can lead to security breaches. It is crucial to update the Linux Kernel to version v5.14.12 or later to fix this vulnerability. If immediate updating is not possible, applying the provided workaround can help mitigate the risk. For further assistance or support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

This vulnerability can allow attackers to bypass the SMAP protection mechanism and gain unauthorized access to sensitive information or execute arbitrary code with elevated privileges.

You can use Vulert's playground at Vulert Scanner to check if your system is affected by this vulnerability. Vulert analyzes the package-lock.json file to identify and alert for open-source vulnerabilities in real-time.

Yes, a fix is available in the Linux Kernel version v5.14.12 or later. Updating the Kernel to this version will mitigate the vulnerability.

If updating the Kernel is not immediately feasible, a temporary workaround can be applied by manually clearing the X86_FEATURE_SMAP flag when the CONFIG_X86_SMAP configuration option is disabled. Please refer to the 'workaround' section for more details.

This vulnerability was discovered by the security research team and reported to the Linux Kernel developers.

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