CVE-2026-139057: wifi: rtw88: fix out-of-bounds CAM write when key table is full

Published Nov 30, 2026
·
Updated

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

wifi: rtw88: fix out-of-bounds CAM write when key table is full

In rtwopssetkey(), when the CAM table is full, rtwsecgetfreecam() returns RTWMAXSECCAMNUM (32) because findnextzerobit()/findfirstzerobit() return the bitmap size when no free slot exists. The bounds check compares the returned index with ">" against totalcamnum (32), so the invalid index 32 passes the check.

rtwsecwritecam() then indexes camtable[32], an array declared with RTWMAXSECCAMNUM (32) entries, causing an out-of-bounds write that corrupts the cammap allocation bitmap. The write also sets bit 32 of cammap, which overruns the bitmap as well.

Fix the off-by-one by rejecting indices >= totalcamnum.

Tested on: RTL8821CE (PCIe) on kernel 7.2.0-rc6-rtw88test-00059-g0d8395707651. The patched module loaded and associated to a WPA2 network; ping traffic passed with 0% packet loss. Reassociation and disconnect/reconnect cycles completed without errors, and the CAM table (debugfs dumpcam) showed valid key entries. The CAM-full boundary (28+ pairwise keys) requires an access point with 28+ clients and is not reachable in a single-client setup, so that path was verified by code inspection.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In rtw_ops_set_key(), reject CAM indices greater than or equal to total_cam_num to prevent out-of-bounds writes when the CAM table is full.

Event History

Nov 30, 2026
CVE Published
via MITRE·01:27 PM
Data Sourced
via MITRE·01:27 PM
Description

Frequently Asked Questions

1

What environment is needed to reach the stated CAM-table boundary?

The described boundary requires 28 or more pairwise keys and an access point with 28 or more clients. The affected path is in the rtw88 Wi-Fi driver.

2

What hardware and network scenario was used to validate the fix?

The fix was tested on an RTL8821CE PCIe adapter with a WPA2 network. Association, ping traffic, reassociation, and disconnect/reconnect cycles completed without errors in that test.

3

Are specific fixed kernel release versions provided?

No fixed kernel release versions are listed. The provided references identify three stable-kernel commits containing the fix.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203