CVE-2022-50279

wifi: rtlwifi: Fix global-out-of-bounds bug in _rtl8812ae_phy_set_txpower_limit()

HIGH
7.1
CVSS Score
Published: September 15, 2025 at 02:21 PM UTC
Updated: June 17, 2026 at 05:23 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.1
Exploit prediction
EPSS 0.2%

Description

In the Linux kernel, the following vulnerability has been resolved: wifi: rtlwifi: Fix global-out-of-bounds bug in _rtl8812ae_phy_set_txpower_limit() There is a global-out-of-bounds reported by KASAN: BUG: KASAN: global-out-of-bounds in _rtl8812ae_eq_n_byte.part.0+0x3d/0x84 [rtl8821ae] Read of size 1 at addr ffffffffa0773c43 by task NetworkManager/411 CPU: 6 PID: 411 Comm: NetworkManager Tainted: G D 6.1.0-rc8+ #144 e15588508517267d37 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), Call Trace: <TASK> ... kasan_report+0xbb/0x1c0 _rtl8812ae_eq_n_byte.part.0+0x3d/0x84 [rtl8821ae] rtl8821ae_phy_bb_config.cold+0x346/0x641 [rtl8821ae] rtl8821ae_hw_init+0x1f5e/0x79b0 [rtl8821ae] ... </TASK> The root cause of the problem is that the comparison order of "prate_section" in _rtl8812ae_phy_set_txpower_limit() is wrong. The _rtl8812ae_eq_n_byte() is used to compare the first n bytes of the two strings from tail to head, which causes the problem. In the _rtl8812ae_phy_set_txpower_limit(), it was originally intended to meet this requirement by carefully designing the comparison order. For example, "pregulation" and "pbandwidth" are compared in order of length from small to large, first is 3 and last is 4. However, the comparison order of "prate_section" dose not obey such order requirement, therefore when "prate_section" is "HT", when comparing from tail to head, it will lead to access out of bounds in _rtl8812ae_eq_n_byte(). As mentioned above, the _rtl8812ae_eq_n_byte() has the same function as strcmp(), so just strcmp() is enough. Fix it by removing _rtl8812ae_eq_n_byte() and use strcmp() barely. Although it can be fixed by adjusting the comparison order of "prate_section", this may cause the value of "rate_section" to not be from 0 to 5. In addition, commit "21e4b0726dc6" not only moved driver from staging to regular tree, but also added setting txpower limit function during the driver config phase, so the problem was introduced by this commit.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

3.18 ≤ v < 4.19.2763.18 ≤ v < 5.10.1733.18 ≤ v < 5.15.993.18 ≤ v < 5.4.2353.18 ≤ v < 6.1.163.18 ≤ v < 6.2.33.18 ≤ v < 6.34.20 ≤ v < 5.4.2355.11 ≤ v < 5.15.995.16 ≤ v < 6.1.165.5 ≤ v < 5.10.1736.2 ≤ v < 6.2.321e4b0726dc671c423e2dc9a85364716219c45023.18
Vendor states this is fixed in 057b52461dc005ecd85a3e4998913b1492ec0f72 (fixed)
Vendor states this is fixed in 0c962dcd6bf64b78eaffc09e497a2beb4e48bc32 (fixed)
Vendor states this is fixed in 117dbeda22ec5ea0918254d03b540ef8b8a64d53 (fixed)
Vendor states this is fixed in 1e950b9a841bc96e98ee25680d5c7aa305120be1 (fixed)
Vendor states this is fixed in 28ea268d95e57cdf6394a058f0d854206d478772 (fixed)
Vendor states this is fixed in f1fe40120de6ad4ffa8299fde035a5feba10d4fb (fixed)
Vendor states this is fixed in fc3442247716fc426bbcf62ed65e086e48a6d44f (fixed)
Vendor states this is fixed in 3.18 (unaffected)
Vendor states this is fixed in 4.19.276 (unaffected)
Vendor states this is fixed in 5.10.173 (unaffected)
Vendor states this is fixed in 5.15.99 (unaffected)
Vendor states this is fixed in 5.4.235 (unaffected)
Vendor states this is fixed in 6.1.16 (unaffected)
Vendor states this is fixed in 6.2.3 (unaffected)
Vendor states this is fixed in 6.3 (unaffected)

References (7)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/057b52461dc005ecd85a3e4998913b1492ec0f72
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/0c962dcd6bf64b78eaffc09e497a2beb4e48bc32
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/117dbeda22ec5ea0918254d03b540ef8b8a64d53
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/1e950b9a841bc96e98ee25680d5c7aa305120be1
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/28ea268d95e57cdf6394a058f0d854206d478772
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/f1fe40120de6ad4ffa8299fde035a5feba10d4fb
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/fc3442247716fc426bbcf62ed65e086e48a6d44f

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-125

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card