{"api_version":"1","generated_at":"2026-11-30T19:52:03+00:00","cve":"CVE-2026-139057","urls":{"html":"https://cve.report/CVE-2026-139057","api":"https://cve.report/api/cve/CVE-2026-139057.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-139057","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-139057"},"summary":{"title":"wifi: rtw88: fix out-of-bounds CAM write when key table is full","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nwifi: rtw88: fix out-of-bounds CAM write when key table is full\n\nIn rtw_ops_set_key(), when the CAM table is full,\nrtw_sec_get_free_cam() returns RTW_MAX_SEC_CAM_NUM (32) because\nfind_next_zero_bit()/find_first_zero_bit() return the bitmap size\nwhen no free slot exists. The bounds check compares the returned\nindex with \">\" against total_cam_num (32), so the invalid index 32\npasses the check.\n\nrtw_sec_write_cam() then indexes cam_table[32], an array declared\nwith RTW_MAX_SEC_CAM_NUM (32) entries, causing an out-of-bounds\nwrite that corrupts the cam_map allocation bitmap. The write also\nsets bit 32 of cam_map, which overruns the bitmap as well.\n\nFix the off-by-one by rejecting indices >= total_cam_num.\n\nTested on: RTL8821CE (PCIe) on kernel\n7.2.0-rc6-rtw88test-00059-g0d8395707651. The patched module loaded\nand associated to a WPA2 network; ping traffic passed with 0% packet\nloss. Reassociation and disconnect/reconnect cycles completed\nwithout errors, and the CAM table (debugfs dump_cam) showed valid\nkey entries. The CAM-full boundary (28+ pairwise keys) requires an\naccess point with 28+ clients and is not reachable in a\nsingle-client setup, so that path was verified by code inspection.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:18:11","updated_at":"2026-11-30 14:18:11"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/7aed0f9c91bcfb449216404a5df44dce825a76e2","name":"https://git.kernel.org/stable/c/7aed0f9c91bcfb449216404a5df44dce825a76e2","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/10030d93efee3ec9088523285109c6549010bbf5","name":"https://git.kernel.org/stable/c/10030d93efee3ec9088523285109c6549010bbf5","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/10d58823cb44681466c022054030b8e68d94ce2f","name":"https://git.kernel.org/stable/c/10d58823cb44681466c022054030b8e68d94ce2f","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/aa26d4a75f2c85e062270bc5e68ce9d495fa12f9","name":"https://git.kernel.org/stable/c/aa26d4a75f2c85e062270bc5e68ce9d495fa12f9","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/46ff3bfce058bc0d0ac54b1338582ea7985fdd4f","name":"https://git.kernel.org/stable/c/46ff3bfce058bc0d0ac54b1338582ea7985fdd4f","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/6f03581ef59d18f022186fabd9ffc3fb2aeced81","name":"https://git.kernel.org/stable/c/6f03581ef59d18f022186fabd9ffc3fb2aeced81","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/16862a9bcd8d9f883b6fd801173eb86a8f4a7b12","name":"https://git.kernel.org/stable/c/16862a9bcd8d9f883b6fd801173eb86a8f4a7b12","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/aa33d8dae0b47d87dc886642a709e1fd41266463","name":"https://git.kernel.org/stable/c/aa33d8dae0b47d87dc886642a709e1fd41266463","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-139057","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139057","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected e3037485c68ec1a299ff41160d8fedbd4abc29b9 6f03581ef59d18f022186fabd9ffc3fb2aeced81 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected e3037485c68ec1a299ff41160d8fedbd4abc29b9 16862a9bcd8d9f883b6fd801173eb86a8f4a7b12 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected e3037485c68ec1a299ff41160d8fedbd4abc29b9 10030d93efee3ec9088523285109c6549010bbf5 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected e3037485c68ec1a299ff41160d8fedbd4abc29b9 7aed0f9c91bcfb449216404a5df44dce825a76e2 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected e3037485c68ec1a299ff41160d8fedbd4abc29b9 46ff3bfce058bc0d0ac54b1338582ea7985fdd4f git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected e3037485c68ec1a299ff41160d8fedbd4abc29b9 aa26d4a75f2c85e062270bc5e68ce9d495fa12f9 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected e3037485c68ec1a299ff41160d8fedbd4abc29b9 aa33d8dae0b47d87dc886642a709e1fd41266463 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected e3037485c68ec1a299ff41160d8fedbd4abc29b9 10d58823cb44681466c022054030b8e68d94ce2f git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5.2","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.2 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.10.275 5.10.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.15.226 5.15.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.193 6.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.163 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.117 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.63 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.4 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["drivers/net/wireless/realtek/rtw88/mac80211.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"6f03581ef59d18f022186fabd9ffc3fb2aeced81","status":"affected","version":"e3037485c68ec1a299ff41160d8fedbd4abc29b9","versionType":"git"},{"lessThan":"16862a9bcd8d9f883b6fd801173eb86a8f4a7b12","status":"affected","version":"e3037485c68ec1a299ff41160d8fedbd4abc29b9","versionType":"git"},{"lessThan":"10030d93efee3ec9088523285109c6549010bbf5","status":"affected","version":"e3037485c68ec1a299ff41160d8fedbd4abc29b9","versionType":"git"},{"lessThan":"7aed0f9c91bcfb449216404a5df44dce825a76e2","status":"affected","version":"e3037485c68ec1a299ff41160d8fedbd4abc29b9","versionType":"git"},{"lessThan":"46ff3bfce058bc0d0ac54b1338582ea7985fdd4f","status":"affected","version":"e3037485c68ec1a299ff41160d8fedbd4abc29b9","versionType":"git"},{"lessThan":"aa26d4a75f2c85e062270bc5e68ce9d495fa12f9","status":"affected","version":"e3037485c68ec1a299ff41160d8fedbd4abc29b9","versionType":"git"},{"lessThan":"aa33d8dae0b47d87dc886642a709e1fd41266463","status":"affected","version":"e3037485c68ec1a299ff41160d8fedbd4abc29b9","versionType":"git"},{"lessThan":"10d58823cb44681466c022054030b8e68d94ce2f","status":"affected","version":"e3037485c68ec1a299ff41160d8fedbd4abc29b9","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["drivers/net/wireless/realtek/rtw88/mac80211.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"5.2"},{"lessThan":"5.2","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"5.10.*","status":"unaffected","version":"5.10.275","versionType":"semver"},{"lessThanOrEqual":"5.15.*","status":"unaffected","version":"5.15.226","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.193","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.163","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.117","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.63","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.4","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.10.275","versionStartIncluding":"5.2","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.15.226","versionStartIncluding":"5.2","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1.193","versionStartIncluding":"5.2","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.163","versionStartIncluding":"5.2","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.117","versionStartIncluding":"5.2","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.63","versionStartIncluding":"5.2","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.4","versionStartIncluding":"5.2","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"5.2","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nwifi: rtw88: fix out-of-bounds CAM write when key table is full\n\nIn rtw_ops_set_key(), when the CAM table is full,\nrtw_sec_get_free_cam() returns RTW_MAX_SEC_CAM_NUM (32) because\nfind_next_zero_bit()/find_first_zero_bit() return the bitmap size\nwhen no free slot exists. The bounds check compares the returned\nindex with \">\" against total_cam_num (32), so the invalid index 32\npasses the check.\n\nrtw_sec_write_cam() then indexes cam_table[32], an array declared\nwith RTW_MAX_SEC_CAM_NUM (32) entries, causing an out-of-bounds\nwrite that corrupts the cam_map allocation bitmap. The write also\nsets bit 32 of cam_map, which overruns the bitmap as well.\n\nFix the off-by-one by rejecting indices >= total_cam_num.\n\nTested on: RTL8821CE (PCIe) on kernel\n7.2.0-rc6-rtw88test-00059-g0d8395707651. The patched module loaded\nand associated to a WPA2 network; ping traffic passed with 0% packet\nloss. Reassociation and disconnect/reconnect cycles completed\nwithout errors, and the CAM table (debugfs dump_cam) showed valid\nkey entries. The CAM-full boundary (28+ pairwise keys) requires an\naccess point with 28+ clients and is not reachable in a\nsingle-client setup, so that path was verified by code inspection."}],"providerMetadata":{"dateUpdated":"2026-11-30T13:27:28.132Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/6f03581ef59d18f022186fabd9ffc3fb2aeced81"},{"url":"https://git.kernel.org/stable/c/16862a9bcd8d9f883b6fd801173eb86a8f4a7b12"},{"url":"https://git.kernel.org/stable/c/10030d93efee3ec9088523285109c6549010bbf5"},{"url":"https://git.kernel.org/stable/c/7aed0f9c91bcfb449216404a5df44dce825a76e2"},{"url":"https://git.kernel.org/stable/c/46ff3bfce058bc0d0ac54b1338582ea7985fdd4f"},{"url":"https://git.kernel.org/stable/c/aa26d4a75f2c85e062270bc5e68ce9d495fa12f9"},{"url":"https://git.kernel.org/stable/c/aa33d8dae0b47d87dc886642a709e1fd41266463"},{"url":"https://git.kernel.org/stable/c/10d58823cb44681466c022054030b8e68d94ce2f"}],"title":"wifi: rtw88: fix out-of-bounds CAM write when key table is full","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-139057","datePublished":"2026-11-30T13:27:28.132Z","dateReserved":"2026-11-30T13:22:15.911Z","dateUpdated":"2026-11-30T13:27:28.132Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:18:11","lastModifiedDate":"2026-11-30 14:18:11","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"139057","Ordinal":"1","Title":"wifi: rtw88: fix out-of-bounds CAM write when key table is full","CVE":"CVE-2026-139057","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"139057","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nwifi: rtw88: fix out-of-bounds CAM write when key table is full\n\nIn rtw_ops_set_key(), when the CAM table is full,\nrtw_sec_get_free_cam() returns RTW_MAX_SEC_CAM_NUM (32) because\nfind_next_zero_bit()/find_first_zero_bit() return the bitmap size\nwhen no free slot exists. The bounds check compares the returned\nindex with \">\" against total_cam_num (32), so the invalid index 32\npasses the check.\n\nrtw_sec_write_cam() then indexes cam_table[32], an array declared\nwith RTW_MAX_SEC_CAM_NUM (32) entries, causing an out-of-bounds\nwrite that corrupts the cam_map allocation bitmap. The write also\nsets bit 32 of cam_map, which overruns the bitmap as well.\n\nFix the off-by-one by rejecting indices >= total_cam_num.\n\nTested on: RTL8821CE (PCIe) on kernel\n7.2.0-rc6-rtw88test-00059-g0d8395707651. The patched module loaded\nand associated to a WPA2 network; ping traffic passed with 0% packet\nloss. Reassociation and disconnect/reconnect cycles completed\nwithout errors, and the CAM table (debugfs dump_cam) showed valid\nkey entries. The CAM-full boundary (28+ pairwise keys) requires an\naccess point with 28+ clients and is not reachable in a\nsingle-client setup, so that path was verified by code inspection.","Type":"Description","Title":"wifi: rtw88: fix out-of-bounds CAM write when key table is full"}]}}}