| 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-49151: can: mcba_usb: properly check endpoint type |
| |
| Description |
| =========== |
| |
| In the Linux kernel, the following vulnerability has been resolved: |
| |
| can: mcba_usb: properly check endpoint type |
| |
| Syzbot reported warning in usb_submit_urb() which is caused by wrong |
| endpoint type. We should check that in endpoint is actually present to |
| prevent this warning. |
| |
| Found pipes are now saved to struct mcba_priv and code uses them |
| directly instead of making pipes in place. |
| |
| Fail log: |
| |
| | usb 5-1: BOGUS urb xfer, pipe 3 != type 1 |
| | WARNING: CPU: 1 PID: 49 at drivers/usb/core/urb.c:502 usb_submit_urb+0xed2/0x18a0 drivers/usb/core/urb.c:502 |
| | Modules linked in: |
| | CPU: 1 PID: 49 Comm: kworker/1:2 Not tainted 5.17.0-rc6-syzkaller-00184-g38f80f42147f #0 |
| | Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 |
| | Workqueue: usb_hub_wq hub_event |
| | RIP: 0010:usb_submit_urb+0xed2/0x18a0 drivers/usb/core/urb.c:502 |
| | ... |
| | Call Trace: |
| | <TASK> |
| | mcba_usb_start drivers/net/can/usb/mcba_usb.c:662 [inline] |
| | mcba_usb_probe+0x8a3/0xc50 drivers/net/can/usb/mcba_usb.c:858 |
| | usb_probe_interface+0x315/0x7f0 drivers/usb/core/driver.c:396 |
| | call_driver_probe drivers/base/dd.c:517 [inline] |
| |
| The Linux kernel CVE team has assigned CVE-2022-49151 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 4.12 with commit 51f3baad7de943780ce0c17bd7975df567dd6e14 and fixed in 4.14.276 with commit 5598442edc29e8f6f2380e4b471dc1a3fcd80508 |
| Issue introduced in 4.12 with commit 51f3baad7de943780ce0c17bd7975df567dd6e14 and fixed in 4.19.238 with commit b48d1bb3f1ca337ad653022aefb5a40a47dfe5cd |
| Issue introduced in 4.12 with commit 51f3baad7de943780ce0c17bd7975df567dd6e14 and fixed in 5.4.189 with commit cbd110b8dd7ad763bf413f71c0484116ae9302d4 |
| Issue introduced in 4.12 with commit 51f3baad7de943780ce0c17bd7975df567dd6e14 and fixed in 5.10.110 with commit ef0acc514123140157b19a9ff2e2de5d91d612bc |
| Issue introduced in 4.12 with commit 51f3baad7de943780ce0c17bd7975df567dd6e14 and fixed in 5.15.33 with commit fa9c1f14002dc0d5293e16a2007bd89b6e79207b |
| Issue introduced in 4.12 with commit 51f3baad7de943780ce0c17bd7975df567dd6e14 and fixed in 5.16.19 with commit 88272b4a37913bdf6f339162a7920bd8e9b49de2 |
| Issue introduced in 4.12 with commit 51f3baad7de943780ce0c17bd7975df567dd6e14 and fixed in 5.17.2 with commit f2ec3cd0f34f8c3f94bc21fbba14868301c9c49d |
| Issue introduced in 4.12 with commit 51f3baad7de943780ce0c17bd7975df567dd6e14 and fixed in 5.18 with commit 136bed0bfd3bc9c95c88aafff2d22ecb3a919f23 |
| |
| 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-49151 |
| 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/can/usb/mcba_usb.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/5598442edc29e8f6f2380e4b471dc1a3fcd80508 |
| https://git.kernel.org/stable/c/b48d1bb3f1ca337ad653022aefb5a40a47dfe5cd |
| https://git.kernel.org/stable/c/cbd110b8dd7ad763bf413f71c0484116ae9302d4 |
| https://git.kernel.org/stable/c/ef0acc514123140157b19a9ff2e2de5d91d612bc |
| https://git.kernel.org/stable/c/fa9c1f14002dc0d5293e16a2007bd89b6e79207b |
| https://git.kernel.org/stable/c/88272b4a37913bdf6f339162a7920bd8e9b49de2 |
| https://git.kernel.org/stable/c/f2ec3cd0f34f8c3f94bc21fbba14868301c9c49d |
| https://git.kernel.org/stable/c/136bed0bfd3bc9c95c88aafff2d22ecb3a919f23 |