# CVE-2022-50279: wifi: rtlwifi: Fix global-out-of-bounds bug in _rtl8812ae_phy_set_txpower_limit()

- Severity: High 7.1 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.17%, higher than 6% of CVEs (2026-12-01)
- Published: 2025-09-15T14:21:16.051Z
- Modified: 2026-11-05T20:17:31.977Z
- Weaknesses: CWE-125
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from 21e4b0726dc671c423e2dc9a85364716219c4502 before fc3442247716fc426bbcf62ed65e086e48a6d44f; from 21e4b0726dc671c423e2dc9a85364716219c4502 before 28ea268d95e57cdf6394a058f0d854206d478772; from 21e4b0726dc671c423e2dc9a85364716219c4502 before 1e950b9a841bc96e98ee25680d5c7aa305120be1; from 21e4b0726dc671c423e2dc9a85364716219c4502 before 0c962dcd6bf64b78eaffc09e497a2beb4e48bc32; from 21e4b0726dc671c423e2dc9a85364716219c4502 before f1fe40120de6ad4ffa8299fde035a5feba10d4fb; from 21e4b0726dc671c423e2dc9a85364716219c4502 before 057b52461dc005ecd85a3e4998913b1492ec0f72; from 21e4b0726dc671c423e2dc9a85364716219c4502 before 117dbeda22ec5ea0918254d03b540ef8b8a64d53; 3.18 (not affected: before 3.18; from 4.19.276 up to 4.19.*; from 5.4.235 up to 5.4.*; from 5.10.173 up to 5.10.*; from 5.15.99 up to 5.15.*; from 6.1.16 up to 6.1.*; from 6.2.3 up to 6.2.*; from 6.3 up to *)
- linux linux_kernel: from 3.18 before 4.19.276; from 4.20 before 5.4.235; from 5.5 before 5.10.173; from 5.11 before 5.15.99; from 5.16 before 6.1.16; from 6.2 before 6.2.3

## References

- <https://git.kernel.org/stable/c/fc3442247716fc426bbcf62ed65e086e48a6d44f> (patch)
- <https://git.kernel.org/stable/c/28ea268d95e57cdf6394a058f0d854206d478772> (patch)
- <https://git.kernel.org/stable/c/1e950b9a841bc96e98ee25680d5c7aa305120be1> (patch)
- <https://git.kernel.org/stable/c/0c962dcd6bf64b78eaffc09e497a2beb4e48bc32> (patch)
- <https://git.kernel.org/stable/c/f1fe40120de6ad4ffa8299fde035a5feba10d4fb> (patch)
- <https://git.kernel.org/stable/c/057b52461dc005ecd85a3e4998913b1492ec0f72> (patch)
- <https://git.kernel.org/stable/c/117dbeda22ec5ea0918254d03b540ef8b8a64d53> (patch)

## Sources

- CVE List: [CVE-2022-50279](https://www.cve.org/CVERecord?id=CVE-2022-50279), CVE Terms of Use, modified 2026-11-05
- NVD: [CVE-2022-50279](https://nvd.nist.gov/vuln/detail/CVE-2022-50279), Public domain, modified 2026-11-05

---

Page: https://cve.day/CVE-2022-50279 · Whole record: https://cve.day/CVE-2022-50279.json · Rebuilt by cve.day 2026-11-25T22:58:21.144Z
