# CVE-2021-47065: rtw88: Fix array overrun in rtw\_get\_tx\_power\_params()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.24% (percentile 9, 2026-11-26)
- **CWE:** CWE-129
- **Published:** 2024-02-29T22:37:39.135Z
- **Modified:** 2026-06-17T04:16:21.910Z

## Who should check

- Anyone running Linux \>= fa6dfe6bff246ddd5be3cfe81637f137acd6c294, \< 6b5aa0cf321c25f41e09a61c83ee4dc7ab9549cb; \>= fa6dfe6bff246ddd5be3cfe81637f137acd6c294, \< 95fb153c6027924cda3422120169d1890737f3a0; \>= fa6dfe6bff246ddd5be3cfe81637f137acd6c294, \< 5f3dbced8eaa5c9ed7d6943f3fea99f235a6516a; \>= fa6dfe6bff246ddd5be3cfe81637f137acd6c294, \< 9cd09722e18a08b6a3d68b8bccfac39ddc22434c; \>= fa6dfe6bff246ddd5be3cfe81637f137acd6c294, \< 2ff25985ea9ccc6c9af2c77b0b49045adcc62e0e
- Anyone running Linux 5.3

## Description

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

rtw88: Fix array overrun in rtw\_get\_tx\_power\_params()

Using a kernel with the Undefined Behaviour Sanity Checker (UBSAN) enabled, the
following array overrun is logged:

================================================================================
UBSAN: array-index-out-of-bounds in /home/finger/wireless-drivers-next/drivers/net/wireless/realtek/rtw88/phy.c:1789:34
index 5 is out of range for type 'u8 \[5\]'
CPU: 2 PID: 84 Comm: kworker/u16:3 Tainted: G           O      5.12.0-rc5-00086-gd88bba47038e-dirty \#651
Hardware name: TOSHIBA TECRA A50-A/TECRA A50-A, BIOS Version 4.50   09/29/2014
Workqueue: phy0 ieee80211\_scan\_work \[mac80211\]
Call Trace:
 dump\_stack+0x64/0x7c
 ubsan\_epilogue+0x5/0x40
 \_\_ubsan\_handle\_out\_of\_bounds.cold+0x43/0x48
 rtw\_get\_tx\_power\_params+0x83a/drivers/net/wireless/realtek/rtw88/0xad0 \[rtw\_core\]
 ? rtw\_pci\_read16+0x20/0x20 \[rtw\_pci\]
 ? check\_hw\_ready+0x50/0x90 \[rtw\_core\]
 rtw\_phy\_get\_tx\_power\_index+0x4d/0xd0 \[rtw\_core\]
 rtw\_phy\_set\_tx\_power\_level+0xee/0x1b0 \[rtw\_core\]
 rtw\_set\_channel+0xab/0x110 \[rtw\_core\]
 rtw\_ops\_config+0x87/0xc0 \[rtw\_core\]
 ieee80211\_hw\_config+0x9d/0x130 \[mac80211\]
 ieee80211\_scan\_state\_set\_channel+0x81/0x170 \[mac80211\]
 ieee80211\_scan\_work+0x19f/0x2a0 \[mac80211\]
 process\_one\_work+0x1dd/0x3a0
 worker\_thread+0x49/0x330
 ? rescuer\_thread+0x3a0/0x3a0
 kthread+0x134/0x150
 ? kthread\_create\_worker\_on\_cpu+0x70/0x70
 ret\_from\_fork+0x22/0x30
================================================================================

The statement where an array is being overrun is shown in the following snippet:

	if (rate \<= DESC\_RATE11M)
		tx\_power = pwr\_idx\_2g-\>cck\_base\[group\];
	else
====\>		tx\_power = pwr\_idx\_2g-\>bw40\_base\[group\];

The associated arrays are defined in main.h as follows:

struct rtw\_2g\_txpwr\_idx {
	u8 cck\_base\[6\];
	u8 bw40\_base\[5\];
	struct rtw\_2g\_1s\_pwr\_idx\_diff ht\_1s\_diff;
	struct rtw\_2g\_ns\_pwr\_idx\_diff ht\_2s\_diff;
	struct rtw\_2g\_ns\_pwr\_idx\_diff ht\_3s\_diff;
	struct rtw\_2g\_ns\_pwr\_idx\_diff ht\_4s\_diff;
};

The problem arises because the value of group is 5 for channel 14. The trivial
increase in the dimension of bw40\_base fails as this struct must match the layout of
efuse. The fix is to add the rate as an argument to rtw\_get\_channel\_group() and set
the group for channel 14 to 4 if rate \<= DESC\_RATE11M.

This patch fixes commit fa6dfe6bff24 ("rtw88: resolve order of tx power setting routines")

## Affected and fixed versions

- Linux: \>= fa6dfe6bff246ddd5be3cfe81637f137acd6c294, \< 6b5aa0cf321c25f41e09a61c83ee4dc7ab9549cb; \>= fa6dfe6bff246ddd5be3cfe81637f137acd6c294, \< 95fb153c6027924cda3422120169d1890737f3a0; \>= fa6dfe6bff246ddd5be3cfe81637f137acd6c294, \< 5f3dbced8eaa5c9ed7d6943f3fea99f235a6516a; \>= fa6dfe6bff246ddd5be3cfe81637f137acd6c294, \< 9cd09722e18a08b6a3d68b8bccfac39ddc22434c; \>= fa6dfe6bff246ddd5be3cfe81637f137acd6c294, \< 2ff25985ea9ccc6c9af2c77b0b49045adcc62e0e (cvelist)
- Linux: 5.3 (cvelist)

## Mitigation

- Upgrade Linux to 2ff25985ea9ccc6c9af2c77b0b49045adcc62e0e or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2021-47065. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-47065.md
Affected: Linux >= fa6dfe6bff246ddd5be3cfe81637f137acd6c294, < 6b5aa0cf321c25f41e09a61c83ee4dc7ab9549cb; >= fa6dfe6bff246ddd5be3cfe81637f137acd6c294, < 95fb153c6027924cda3422120169d1890737f3a0; >= fa6dfe6bff246ddd5be3cfe81637f137acd6c294, < 5f3dbced8eaa5c9ed7d6943f3fea99f235a6516a; >= fa6dfe6bff246ddd5be3cfe…
Fixed in: Linux 6b5aa0cf321c25f41e09a61c83ee4dc7ab9549cb, Linux 95fb153c6027924cda3422120169d1890737f3a0, Linux 5f3dbced8eaa5c9ed7d6943f3fea99f235a6516a, Linux 9cd09722e18a08b6a3d68b8bccfac39ddc22434c, Linux 2ff25985ea9ccc6c9af2c77b0b49045adcc62e0e

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2021-47065 being exploited?

There is no confirmed exploitation: CVE-2021-47065 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.24% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2021-47065?

High: CVSS 7.8 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2021-47065?

Linux \>= fa6dfe6bff246ddd5be3cfe81637f137acd6c294, \< 6b5aa0cf321c25f41e09a61c83ee4dc7ab9549cb; \>= fa6dfe6bff246ddd5be3cfe81637f137acd6c294, \< 95fb153c6027924cda3422120169d1890737f3a0; \>= fa6dfe6bff246ddd5be3cfe81637f137acd6c294, \< 5f3dbced8eaa5c9ed7d6943f3fea99f235a6516a; \>= fa6dfe6bff246ddd5be3cfe81637f137acd6c294, \< 9cd09722e18a08b6a3d68b8bccfac39ddc22434c; \>= fa6dfe6bff246ddd5be3cfe81637f137acd6c294, \< 2ff25985ea9ccc6c9af2c77b0b49045adcc62e0e; Linux 5.3.

### Is there a fix for CVE-2021-47065?

Yes. Fixed in Linux 6b5aa0cf321c25f41e09a61c83ee4dc7ab9549cb, Linux 95fb153c6027924cda3422120169d1890737f3a0, Linux 5f3dbced8eaa5c9ed7d6943f3fea99f235a6516a, Linux 9cd09722e18a08b6a3d68b8bccfac39ddc22434c, Linux 2ff25985ea9ccc6c9af2c77b0b49045adcc62e0e. Upgrade Linux to 2ff25985ea9ccc6c9af2c77b0b49045adcc62e0e or later.

### How do I check if I'm affected by CVE-2021-47065?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/6b5aa0cf321c25f41e09a61c83ee4dc7ab9549cb>
- patch: <https://git.kernel.org/stable/c/95fb153c6027924cda3422120169d1890737f3a0>
- patch: <https://git.kernel.org/stable/c/5f3dbced8eaa5c9ed7d6943f3fea99f235a6516a>
- patch: <https://git.kernel.org/stable/c/9cd09722e18a08b6a3d68b8bccfac39ddc22434c>
- patch: <https://git.kernel.org/stable/c/2ff25985ea9ccc6c9af2c77b0b49045adcc62e0e>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2021-47065>

HTML: <https://flawdb.com/CVE-2021-47065> · JSON: <https://flawdb.com/api/v1/entries/CVE-2021-47065>
