Vulnerability in Kernel: cfg80211_stop_ap not called when switching from P2P_GO type

Kernel Updated 02 Oct 2025

Summary

29/11/2021
N/A
No i
Unrated
Not published

GSD-2021-1002256: cfg80211: call cfg80211_stop_ap when switch from P2P_GO type. Affects Kernel versions >= ac800140c20e7ae51117e71289065bedd4930fc2, < 52affc201fc22a1ab9a59ef0ed641a9adfcb8d13. 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

The Kernel is a crucial component of the Linux operating system that provides core functionality and acts as an interface between hardware and software. It manages system resources, facilitates communication between different software components, and enables the execution of user programs. The cfg80211 module within the Kernel is responsible for handling wireless network configuration and management. It provides functions and interfaces for various wireless operations, including the creation and management of access points (APs) in Peer-to-Peer (P2P) mode.

Vulnerability Detail

The vulnerability identified in the cfg80211 module occurs when switching from P2P_GO (Group Owner) type to another type. In this scenario, the cfg80211_stop_ap function, which is responsible for stopping the AP, is not called. This oversight can lead to the AP remaining active even after the switch, potentially exposing the system to security risks. Attackers may exploit this vulnerability to gain unauthorized access to the network or perform other malicious activities.

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, users can manually call the cfg80211_stop_ap function when switching from P2P_GO type to ensure the AP is properly stopped. Here is an example of how to do this in C code:

#include <linux/nl80211.h>

void stop_ap_workaround()
{
    struct cfg80211_registered_device *rdev;
    struct wireless_dev *wdev;

    // Get the registered device and wireless device
    rdev = cfg80211_get_dev_by_name("wlan0");
    wdev = rdev->wiphy->wdev;

    // Check if the device is in P2P_GO mode
    if (wdev->iftype == NL80211_IFTYPE_P2P_GO) {
        // Call cfg80211_stop_ap to stop the AP
        cfg80211_stop_ap(wdev, 0);
    }

    // Release the references
    cfg80211_put_dev(rdev);
}

Conclusion

In conclusion, the vulnerability in the Kernel's cfg80211 module allows the AP to remain active when switching from P2P_GO type, potentially exposing the system to security risks. It is crucial to update the Kernel to the fixed version or apply the provided workaround to mitigate this vulnerability. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

The vulnerability allows the AP to remain active after switching from P2P_GO type, potentially exposing the system to security risks. Attackers may exploit this to gain unauthorized access or perform malicious activities.

You can use the Vulert Playground (https://vulert.com/scanner) to check if your system is affected by this vulnerability. Simply upload your manifest file (e.g., package-lock.json) and Vulert will analyze it for any open-source vulnerabilities, including this one.

At the time of this report, there are no known public exploits specifically targeting this vulnerability. However, it is important to apply the recommended fix to mitigate any potential risks.

While it is highly recommended to update the Kernel to the fixed version, you can apply the provided workaround to manually stop the AP when switching from P2P_GO type. However, this is only a temporary solution, and updating the Kernel is the best course of action.

You can find more information about this vulnerability, including its technical details and the fix, in the official Linux Kernel repository: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/

Related vulnerabilities

Recent vulnerabilities recorded for Kernel.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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