| From bippy-5f407fcff5a0 Mon Sep 17 00:00:00 2001 |
| From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| To: <linux-cve-announce@vger.kernel.org> |
| Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org> |
| Subject: CVE-2022-49754: Bluetooth: Fix a buffer overflow in mgmt_mesh_add() |
| |
| Description |
| =========== |
| |
| In the Linux kernel, the following vulnerability has been resolved: |
| |
| Bluetooth: Fix a buffer overflow in mgmt_mesh_add() |
| |
| Smatch Warning: |
| net/bluetooth/mgmt_util.c:375 mgmt_mesh_add() error: __memcpy() |
| 'mesh_tx->param' too small (48 vs 50) |
| |
| Analysis: |
| |
| 'mesh_tx->param' is array of size 48. This is the destination. |
| u8 param[sizeof(struct mgmt_cp_mesh_send) + 29]; // 19 + 29 = 48. |
| |
| But in the caller 'mesh_send' we reject only when len > 50. |
| len > (MGMT_MESH_SEND_SIZE + 31) // 19 + 31 = 50. |
| |
| The Linux kernel CVE team has assigned CVE-2022-49754 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 6.1 with commit b338d91703fae6f6afd67f3f75caa3b8f36ddef3 and fixed in 6.1.9 with commit ed818fd8c531abf561b379995ee7cc4c68029464 |
| Issue introduced in 6.1 with commit b338d91703fae6f6afd67f3f75caa3b8f36ddef3 and fixed in 6.2 with commit 2185e0fdbb2137f22a9dd9fcbf6481400d56299b |
| |
| 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-49754 |
| 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: |
| net/bluetooth/mgmt_util.h |
| |
| |
| 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/ed818fd8c531abf561b379995ee7cc4c68029464 |
| https://git.kernel.org/stable/c/2185e0fdbb2137f22a9dd9fcbf6481400d56299b |