From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 511611A4F21 for ; Wed, 26 Feb 2025 01:58:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740535131; cv=none; b=Lyh0dqdsY6wGQ5Rmm35U7uupXetLScMzM1AcopdVctKQniQCQlWWqwDqiChpH9D6FVZonkw8asOFSo8CKWMraGgFSHauqIY0tEMRiAsRhqw+FSVmaxhWsa12cY313X5cNzj3J8TpfWbIzQ5uXW/zZDYfod4naeSH8zj/2hqOqzQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740535131; c=relaxed/simple; bh=2rAyv9MiAgRpzmYl4Hx/DaTWnT8UXqR6uBnrrv9p4wo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Qr28b0SMDs8IX1ayAPP0gihTaiH17vOXRn0x7NFAREKbnh/DnhBQqqVt+5OLuhSOEV0ndTwWGn8y3SY5aPMUYQi87E9GeFfN5YSnDJs29gY3RoNHmvzT29IvK0XMF1jHbCZ8RzKiqqxMFweWeScicI6yICuXdnbGsNyoypQ70aA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=EnnBVkvP; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="EnnBVkvP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 27651C4CEDD; Wed, 26 Feb 2025 01:58:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740535131; bh=2rAyv9MiAgRpzmYl4Hx/DaTWnT8UXqR6uBnrrv9p4wo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=EnnBVkvPwG6GBLwfjUpnbenUe398N7XfZNedSEJqU23lNW8h5F3/sPfdI/+7OoNqf IUpUeEPJvoLi8YcmiNnL/J/LXpK3S8BrFzOLS62576FrClVYjhUFIgsftCIHK6pNsM Yq8+DdZk3Bgzciu0oGfqgv0q0Qp2vFhWSScRftDI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49151: can: mcba_usb: properly check endpoint type Date: Wed, 26 Feb 2025 02:55:56 +0100 Message-ID: <2025022609-CVE-2022-49151-5b76@gregkh> X-Mailer: git-send-email 2.48.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=4159; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=2rAyv9MiAgRpzmYl4Hx/DaTWnT8UXqR6uBnrrv9p4wo=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7Shy/P3Re90tpzTOlS3EFKzRunTnI+/LI5kcHgiriz O6o8Ul+74hlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJnGximJ+x2PCswNL7Rt/s crruuXqY/wy7N5lhwbXozZwrjivF3NC+/WWyxMH3CdV/SwE= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit 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: | | 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