cve-2021-47065
Vulnerability from cvelistv5
Published
2024-02-29 22:37
Modified
2025-05-04 07:03
Severity ?
EPSS score ?
Summary
rtw88: Fix array overrun in rtw_get_tx_power_params()
References
{ "containers": { "adp": [ { "metrics": [ { "other": { "content": { "id": "CVE-2021-47065", "options": [ { "Exploitation": "none" }, { "Automatable": "no" }, { "Technical Impact": "partial" } ], "role": "CISA Coordinator", "timestamp": "2024-03-06T19:40:45.781001Z", "version": "2.0.3" }, "type": "ssvc" } } ], "providerMetadata": { "dateUpdated": "2024-06-04T17:13:26.150Z", "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "shortName": "CISA-ADP" }, "title": "CISA ADP Vulnrichment" }, { "providerMetadata": { "dateUpdated": "2024-08-04T05:24:39.558Z", "orgId": "af854a3a-2127-422b-91ae-364da2661108", "shortName": "CVE" }, "references": [ { "tags": [ "x_transferred" ], "url": "https://git.kernel.org/stable/c/6b5aa0cf321c25f41e09a61c83ee4dc7ab9549cb" }, { "tags": [ "x_transferred" ], "url": "https://git.kernel.org/stable/c/95fb153c6027924cda3422120169d1890737f3a0" }, { "tags": [ "x_transferred" ], "url": "https://git.kernel.org/stable/c/5f3dbced8eaa5c9ed7d6943f3fea99f235a6516a" }, { "tags": [ "x_transferred" ], "url": "https://git.kernel.org/stable/c/9cd09722e18a08b6a3d68b8bccfac39ddc22434c" }, { "tags": [ "x_transferred" ], "url": "https://git.kernel.org/stable/c/2ff25985ea9ccc6c9af2c77b0b49045adcc62e0e" } ], "title": "CVE Program Container" } ], "cna": { "affected": [ { "defaultStatus": "unaffected", "product": "Linux", "programFiles": [ "drivers/net/wireless/realtek/rtw88/phy.c" ], "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "vendor": "Linux", "versions": [ { "lessThan": "6b5aa0cf321c25f41e09a61c83ee4dc7ab9549cb", "status": "affected", "version": "fa6dfe6bff246ddd5be3cfe81637f137acd6c294", "versionType": "git" }, { "lessThan": "95fb153c6027924cda3422120169d1890737f3a0", "status": "affected", "version": "fa6dfe6bff246ddd5be3cfe81637f137acd6c294", "versionType": "git" }, { "lessThan": "5f3dbced8eaa5c9ed7d6943f3fea99f235a6516a", "status": "affected", "version": "fa6dfe6bff246ddd5be3cfe81637f137acd6c294", "versionType": "git" }, { "lessThan": "9cd09722e18a08b6a3d68b8bccfac39ddc22434c", "status": "affected", "version": "fa6dfe6bff246ddd5be3cfe81637f137acd6c294", "versionType": "git" }, { "lessThan": "2ff25985ea9ccc6c9af2c77b0b49045adcc62e0e", "status": "affected", "version": "fa6dfe6bff246ddd5be3cfe81637f137acd6c294", "versionType": "git" } ] }, { "defaultStatus": "affected", "product": "Linux", "programFiles": [ "drivers/net/wireless/realtek/rtw88/phy.c" ], "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "vendor": "Linux", "versions": [ { "status": "affected", "version": "5.3" }, { "lessThan": "5.3", "status": "unaffected", "version": "0", "versionType": "semver" }, { "lessThanOrEqual": "5.4.*", "status": "unaffected", "version": "5.4.119", "versionType": "semver" }, { "lessThanOrEqual": "5.10.*", "status": "unaffected", "version": "5.10.37", "versionType": "semver" }, { "lessThanOrEqual": "5.11.*", "status": "unaffected", "version": "5.11.21", "versionType": "semver" }, { "lessThanOrEqual": "5.12.*", "status": "unaffected", "version": "5.12.4", "versionType": "semver" }, { "lessThanOrEqual": "*", "status": "unaffected", "version": "5.13", "versionType": "original_commit_for_fix" } ] } ], "cpeApplicability": [ { "nodes": [ { "cpeMatch": [ { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "5.4.119", "versionStartIncluding": "5.3", "vulnerable": true }, { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "5.10.37", "versionStartIncluding": "5.3", "vulnerable": true }, { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "5.11.21", "versionStartIncluding": "5.3", "vulnerable": true }, { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "5.12.4", "versionStartIncluding": "5.3", "vulnerable": true }, { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "5.13", "versionStartIncluding": "5.3", "vulnerable": true } ], "negate": false, "operator": "OR" } ] } ], "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nrtw88: Fix array overrun in rtw_get_tx_power_params()\n\nUsing a kernel with the Undefined Behaviour Sanity Checker (UBSAN) enabled, the\nfollowing array overrun is logged:\n\n================================================================================\nUBSAN: array-index-out-of-bounds in /home/finger/wireless-drivers-next/drivers/net/wireless/realtek/rtw88/phy.c:1789:34\nindex 5 is out of range for type \u0027u8 [5]\u0027\nCPU: 2 PID: 84 Comm: kworker/u16:3 Tainted: G O 5.12.0-rc5-00086-gd88bba47038e-dirty #651\nHardware name: TOSHIBA TECRA A50-A/TECRA A50-A, BIOS Version 4.50 09/29/2014\nWorkqueue: phy0 ieee80211_scan_work [mac80211]\nCall Trace:\n dump_stack+0x64/0x7c\n ubsan_epilogue+0x5/0x40\n __ubsan_handle_out_of_bounds.cold+0x43/0x48\n rtw_get_tx_power_params+0x83a/drivers/net/wireless/realtek/rtw88/0xad0 [rtw_core]\n ? rtw_pci_read16+0x20/0x20 [rtw_pci]\n ? check_hw_ready+0x50/0x90 [rtw_core]\n rtw_phy_get_tx_power_index+0x4d/0xd0 [rtw_core]\n rtw_phy_set_tx_power_level+0xee/0x1b0 [rtw_core]\n rtw_set_channel+0xab/0x110 [rtw_core]\n rtw_ops_config+0x87/0xc0 [rtw_core]\n ieee80211_hw_config+0x9d/0x130 [mac80211]\n ieee80211_scan_state_set_channel+0x81/0x170 [mac80211]\n ieee80211_scan_work+0x19f/0x2a0 [mac80211]\n process_one_work+0x1dd/0x3a0\n worker_thread+0x49/0x330\n ? rescuer_thread+0x3a0/0x3a0\n kthread+0x134/0x150\n ? kthread_create_worker_on_cpu+0x70/0x70\n ret_from_fork+0x22/0x30\n================================================================================\n\nThe statement where an array is being overrun is shown in the following snippet:\n\n\tif (rate \u003c= DESC_RATE11M)\n\t\ttx_power = pwr_idx_2g-\u003ecck_base[group];\n\telse\n====\u003e\t\ttx_power = pwr_idx_2g-\u003ebw40_base[group];\n\nThe associated arrays are defined in main.h as follows:\n\nstruct rtw_2g_txpwr_idx {\n\tu8 cck_base[6];\n\tu8 bw40_base[5];\n\tstruct rtw_2g_1s_pwr_idx_diff ht_1s_diff;\n\tstruct rtw_2g_ns_pwr_idx_diff ht_2s_diff;\n\tstruct rtw_2g_ns_pwr_idx_diff ht_3s_diff;\n\tstruct rtw_2g_ns_pwr_idx_diff ht_4s_diff;\n};\n\nThe problem arises because the value of group is 5 for channel 14. The trivial\nincrease in the dimension of bw40_base fails as this struct must match the layout of\nefuse. The fix is to add the rate as an argument to rtw_get_channel_group() and set\nthe group for channel 14 to 4 if rate \u003c= DESC_RATE11M.\n\nThis patch fixes commit fa6dfe6bff24 (\"rtw88: resolve order of tx power setting routines\")" } ], "providerMetadata": { "dateUpdated": "2025-05-04T07:03:28.649Z", "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux" }, "references": [ { "url": "https://git.kernel.org/stable/c/6b5aa0cf321c25f41e09a61c83ee4dc7ab9549cb" }, { "url": "https://git.kernel.org/stable/c/95fb153c6027924cda3422120169d1890737f3a0" }, { "url": "https://git.kernel.org/stable/c/5f3dbced8eaa5c9ed7d6943f3fea99f235a6516a" }, { "url": "https://git.kernel.org/stable/c/9cd09722e18a08b6a3d68b8bccfac39ddc22434c" }, { "url": "https://git.kernel.org/stable/c/2ff25985ea9ccc6c9af2c77b0b49045adcc62e0e" } ], "title": "rtw88: Fix array overrun in rtw_get_tx_power_params()", "x_generator": { "engine": "bippy-1.2.0" } } }, "cveMetadata": { "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "assignerShortName": "Linux", "cveId": "CVE-2021-47065", "datePublished": "2024-02-29T22:37:39.135Z", "dateReserved": "2024-02-29T22:33:44.296Z", "dateUpdated": "2025-05-04T07:03:28.649Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1", "meta": { "nvd": "{\"cve\":{\"id\":\"CVE-2021-47065\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-02-29T23:15:08.000\",\"lastModified\":\"2024-12-10T17:54:50.497\",\"vulnStatus\":\"Analyzed\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nrtw88: Fix array overrun in rtw_get_tx_power_params()\\n\\nUsing a kernel with the Undefined Behaviour Sanity Checker (UBSAN) enabled, the\\nfollowing array overrun is logged:\\n\\n================================================================================\\nUBSAN: array-index-out-of-bounds in /home/finger/wireless-drivers-next/drivers/net/wireless/realtek/rtw88/phy.c:1789:34\\nindex 5 is out of range for type \u0027u8 [5]\u0027\\nCPU: 2 PID: 84 Comm: kworker/u16:3 Tainted: G O 5.12.0-rc5-00086-gd88bba47038e-dirty #651\\nHardware name: TOSHIBA TECRA A50-A/TECRA A50-A, BIOS Version 4.50 09/29/2014\\nWorkqueue: phy0 ieee80211_scan_work [mac80211]\\nCall Trace:\\n dump_stack+0x64/0x7c\\n ubsan_epilogue+0x5/0x40\\n __ubsan_handle_out_of_bounds.cold+0x43/0x48\\n rtw_get_tx_power_params+0x83a/drivers/net/wireless/realtek/rtw88/0xad0 [rtw_core]\\n ? rtw_pci_read16+0x20/0x20 [rtw_pci]\\n ? check_hw_ready+0x50/0x90 [rtw_core]\\n rtw_phy_get_tx_power_index+0x4d/0xd0 [rtw_core]\\n rtw_phy_set_tx_power_level+0xee/0x1b0 [rtw_core]\\n rtw_set_channel+0xab/0x110 [rtw_core]\\n rtw_ops_config+0x87/0xc0 [rtw_core]\\n ieee80211_hw_config+0x9d/0x130 [mac80211]\\n ieee80211_scan_state_set_channel+0x81/0x170 [mac80211]\\n ieee80211_scan_work+0x19f/0x2a0 [mac80211]\\n process_one_work+0x1dd/0x3a0\\n worker_thread+0x49/0x330\\n ? rescuer_thread+0x3a0/0x3a0\\n kthread+0x134/0x150\\n ? kthread_create_worker_on_cpu+0x70/0x70\\n ret_from_fork+0x22/0x30\\n================================================================================\\n\\nThe statement where an array is being overrun is shown in the following snippet:\\n\\n\\tif (rate \u003c= DESC_RATE11M)\\n\\t\\ttx_power = pwr_idx_2g-\u003ecck_base[group];\\n\\telse\\n====\u003e\\t\\ttx_power = pwr_idx_2g-\u003ebw40_base[group];\\n\\nThe associated arrays are defined in main.h as follows:\\n\\nstruct rtw_2g_txpwr_idx {\\n\\tu8 cck_base[6];\\n\\tu8 bw40_base[5];\\n\\tstruct rtw_2g_1s_pwr_idx_diff ht_1s_diff;\\n\\tstruct rtw_2g_ns_pwr_idx_diff ht_2s_diff;\\n\\tstruct rtw_2g_ns_pwr_idx_diff ht_3s_diff;\\n\\tstruct rtw_2g_ns_pwr_idx_diff ht_4s_diff;\\n};\\n\\nThe problem arises because the value of group is 5 for channel 14. The trivial\\nincrease in the dimension of bw40_base fails as this struct must match the layout of\\nefuse. The fix is to add the rate as an argument to rtw_get_channel_group() and set\\nthe group for channel 14 to 4 if rate \u003c= DESC_RATE11M.\\n\\nThis patch fixes commit fa6dfe6bff24 (\\\"rtw88: resolve order of tx power setting routines\\\")\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se resolvi\u00f3 la siguiente vulnerabilidad: rtw88: corrige el desbordamiento de la matriz en rtw_get_tx_power_params() Al utilizar un kernel con el Verificador de estado de comportamiento indefinido (UBSAN) habilitado, se registra el siguiente desbordamiento de la matriz: ======== ==================================================== ====================== UBSAN: \u00edndice de matriz fuera de los l\u00edmites en /home/finger/wireless-drivers-next/drivers/net/wireless /realtek/rtw88/phy.c:1789:34 el \u00edndice 5 est\u00e1 fuera de rango para el tipo \u0027u8 [5]\u0027 CPU: 2 PID: 84 Comm: kworker/u16:3 Tainted: GO 5.12.0-rc5-00086- gd88bba47038e-dirty #651 Nombre del hardware: TOSHIBA TECRA A50-A/TECRA A50-A, BIOS versi\u00f3n 4.50 29/09/2014 Cola de trabajo: phy0 ieee80211_scan_work [mac80211] Seguimiento de llamadas: 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/0xc 0 [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 trabajador_thread+0x49/0x330? hilo_rescate+0x3a0/0x3a0 kthread+0x134/0x150 ? kthread_create_worker_on_cpu+0x70/0x70 ret_from_fork+0x22/0x30 ========================================== ========================================= Se muestra la declaraci\u00f3n donde se est\u00e1 invadiendo una matriz en el siguiente fragmento: if (rate \u0026lt;= DESC_RATE11M) tx_power = pwr_idx_2g-\u0026gt;cck_base[group]; else ====\u0026gt; tx_power = pwr_idx_2g-\u0026gt;bw40_base[grupo]; Las matrices asociadas se definen en main.h de la siguiente manera: struct rtw_2g_txpwr_idx { u8 cck_base[6]; u8 bw40_base[5]; estructura rtw_2g_1s_pwr_idx_diff ht_1s_diff; estructura rtw_2g_ns_pwr_idx_diff ht_2s_diff; estructura rtw_2g_ns_pwr_idx_diff ht_3s_diff; estructura rtw_2g_ns_pwr_idx_diff ht_4s_diff; }; El problema surge porque el valor del grupo es 5 para el canal 14. El aumento trivial en la dimensi\u00f3n de bw40_base falla ya que esta estructura debe coincidir con el dise\u00f1o de efuse. La soluci\u00f3n es agregar la tasa como argumento a rtw_get_channel_group() y configurar el grupo para el canal 14 en 4 si la tasa \u0026lt;= DESC_RATE11M. Este parche corrige la confirmaci\u00f3n fa6dfe6bff24 (\\\"rtw88: resolver el orden de las rutinas de configuraci\u00f3n de energ\u00eda de transmisi\u00f3n\\\")\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\",\"baseScore\":7.8,\"baseSeverity\":\"HIGH\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":5.9}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-129\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.3\",\"versionEndExcluding\":\"5.4.119\",\"matchCriteriaId\":\"2196F00F-D829-48E9-87B7-31759423D345\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.5\",\"versionEndExcluding\":\"5.10.37\",\"matchCriteriaId\":\"7A4CF5D6-ACBA-4980-ABFD-3D7A53B5BB4E\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.11\",\"versionEndExcluding\":\"5.11.21\",\"matchCriteriaId\":\"8CBB94EC-EC33-4464-99C5-03E5542715F0\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.12\",\"versionEndExcluding\":\"5.12.4\",\"matchCriteriaId\":\"D8C7052F-1B7B-4327-9C2B-84EBF3243838\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/2ff25985ea9ccc6c9af2c77b0b49045adcc62e0e\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/5f3dbced8eaa5c9ed7d6943f3fea99f235a6516a\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/6b5aa0cf321c25f41e09a61c83ee4dc7ab9549cb\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/95fb153c6027924cda3422120169d1890737f3a0\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/9cd09722e18a08b6a3d68b8bccfac39ddc22434c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/2ff25985ea9ccc6c9af2c77b0b49045adcc62e0e\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/5f3dbced8eaa5c9ed7d6943f3fea99f235a6516a\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/6b5aa0cf321c25f41e09a61c83ee4dc7ab9549cb\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/95fb153c6027924cda3422120169d1890737f3a0\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/9cd09722e18a08b6a3d68b8bccfac39ddc22434c\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]}]}}" } }
Loading...
Loading...
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.