| From bippy-1.1.0 Mon Sep 17 00:00:00 2001 |
| From: Greg Kroah-Hartman <gregkh@kernel.org> |
| To: <linux-cve-announce@vger.kernel.org> |
| Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org> |
| Subject: CVE-2022-49806: net: microchip: sparx5: Fix potential null-ptr-deref in sparx_stats_init() and sparx5_start() |
| |
| Description |
| =========== |
| |
| In the Linux kernel, the following vulnerability has been resolved: |
| |
| net: microchip: sparx5: Fix potential null-ptr-deref in sparx_stats_init() and sparx5_start() |
| |
| sparx_stats_init() calls create_singlethread_workqueue() and not |
| checked the ret value, which may return NULL. And a null-ptr-deref may |
| happen: |
| |
| sparx_stats_init() |
| create_singlethread_workqueue() # failed, sparx5->stats_queue is NULL |
| queue_delayed_work() |
| queue_delayed_work_on() |
| __queue_delayed_work() # warning here, but continue |
| __queue_work() # access wq->flags, null-ptr-deref |
| |
| Check the ret value and return -ENOMEM if it is NULL. So as |
| sparx5_start(). |
| |
| The Linux kernel CVE team has assigned CVE-2022-49806 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 5.14 with commit b37a1bae742f92cc9b1f777d54e04ee3d86bbfc2 and fixed in 5.15.80 with commit 80e590aeb132887102c3fa79d99b338f099dc952 |
| Issue introduced in 5.14 with commit b37a1bae742f92cc9b1f777d54e04ee3d86bbfc2 and fixed in 6.0.10 with commit 456327e565dc49d18b2f595f39f47df8a36f1057 |
| Issue introduced in 5.14 with commit b37a1bae742f92cc9b1f777d54e04ee3d86bbfc2 and fixed in 6.1 with commit 639f5d006e36bb303f525d9479448c412b720c39 |
| |
| Please see https://www.kernel.org for a full list of currently supported |
| kernel versions by the kernel community. |
| |
| Unaffected versions might change over time as fixes are backported to |
| older supported kernel versions. The official CVE entry at |
| https://cve.org/CVERecord/?id=CVE-2022-49806 |
| will be updated if fixes are backported, please check that for the most |
| up to date information about this issue. |
| |
| |
| Affected files |
| ============== |
| |
| The file(s) affected by this issue are: |
| drivers/net/ethernet/microchip/sparx5/sparx5_ethtool.c |
| drivers/net/ethernet/microchip/sparx5/sparx5_main.c |
| |
| |
| Mitigation |
| ========== |
| |
| The Linux kernel CVE team recommends that you update to the latest |
| stable kernel version for this, and many other bugfixes. Individual |
| changes are never tested alone, but rather are part of a larger kernel |
| release. Cherry-picking individual commits is not recommended or |
| supported by the Linux kernel community at all. If however, updating to |
| the latest release is impossible, the individual changes to resolve this |
| issue can be found at these commits: |
| https://git.kernel.org/stable/c/80e590aeb132887102c3fa79d99b338f099dc952 |
| https://git.kernel.org/stable/c/456327e565dc49d18b2f595f39f47df8a36f1057 |
| https://git.kernel.org/stable/c/639f5d006e36bb303f525d9479448c412b720c39 |