CVE Vulnerabilities

CVE-2021-47194

Improper Initialization

Published: Apr 10, 2024 | Modified: Apr 19, 2024
CVSS 3.x
7.8
HIGH
Source:
NVD
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS 2.x
RedHat/V2
RedHat/V3
Ubuntu

In the Linux kernel, the following vulnerability has been resolved:

cfg80211: call cfg80211_stop_ap when switch from P2P_GO type

If the userspace tools switch from NL80211_IFTYPE_P2P_GO to NL80211_IFTYPE_ADHOC via send_msg(NL80211_CMD_SET_INTERFACE), it does not call the cleanup cfg80211_stop_ap(), this leads to the initialization of in-use data. For example, this path re-init the sdata->assigned_chanctx_list while it is still an element of assigned_vifs list, and makes that linked list corrupt.

Weakness

The product does not initialize or incorrectly initializes a resource, which might leave the resource in an unexpected state when it is accessed or used.

Affected Software

Name Vendor Start Version End Version
Linux_kernel Linux 3.6.0 (including) 4.4.293 (excluding)
Linux_kernel Linux 4.5.0 (including) 4.9.291 (excluding)
Linux_kernel Linux 4.10.0 (including) 4.14.256 (excluding)
Linux_kernel Linux 4.15.0 (including) 4.19.218 (excluding)
Linux_kernel Linux 4.20.0 (including) 5.4.162 (excluding)
Linux_kernel Linux 5.5.0 (including) 5.10.82 (excluding)
Linux_kernel Linux 5.11.0 (including) 5.15.5 (excluding)

Potential Mitigations

  • Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
  • For example, in Java, if the programmer does not explicitly initialize a variable, then the code could produce a compile-time error (if the variable is local) or automatically initialize the variable to the default value for the variable’s type. In Perl, if explicit initialization is not performed, then a default value of undef is assigned, which is interpreted as 0, false, or an equivalent value depending on the context in which the variable is accessed.

References