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 102F045C10 for ; Wed, 1 May 2024 05:31:40 +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=1714541500; cv=none; b=RPAtumUnRJQ4uozBcGCDfoMr0TqBdXbzI8F2hRZ4wArC8P73roZW39ijb9XEftuuG7uxbF2NN1w1TBvglj2vso2ZrHXotKlaC3mp7h6lK7nvtyBKmgSCZgnxyuDwwodt4QHRbgVP5ZG1UWw6M6J5jVBTBha1GqF99EMEwE4ojqY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714541500; c=relaxed/simple; bh=+/jsABGZ2qq0MKphi/LwhMIaOdVXSsRqCiCw2WV9Mk8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Q1rdmgqOK5PheMysnruJrF0HAdYl/tfHeY13U7ejDtYCjWmtKKSjxmLJM9hQ4ZMkVuuC2Q7xXrOUpZjlRK1Uo7x4klal8++J28e2liuEt1jk8HPU7twFgop3JqDyOPvPKSp0YSYbIj66UiQTi86WEl9J3vLqVhYBm0Unboi+D2c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=GisD8+oD; 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="GisD8+oD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D45DC113CC; Wed, 1 May 2024 05:31:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1714541499; bh=+/jsABGZ2qq0MKphi/LwhMIaOdVXSsRqCiCw2WV9Mk8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=GisD8+oD+FZh7fSj37Cc2fXpQn3PvwftTqTjjXoDR5qRCeXXDYfy5ROwEXTwUv2Aj 3aToI0INQxW+Y1VmW//dwTryHXy7GGE/AeYIv2nEamF6Vzpgd9yHnPVrILMLxX+pMk zkQbGZ0LZlBNum9XsNUHc4VqkdfOvdgwkGKp3FmM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-27001: comedi: vmk80xx: fix incomplete endpoint checking Date: Wed, 1 May 2024 07:31:02 +0200 Message-ID: <2024050146-CVE-2024-27001-16ca@gregkh> X-Mailer: git-send-email 2.44.0 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=3398; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=+/jsABGZ2qq0MKphi/LwhMIaOdVXSsRqCiCw2WV9Mk8=; b=owGbwMvMwCRo6H6F97bub03G02pJDGmGl9smLD2+7XfZe4UPffv5f/7SWSXnqTFbKV+pxf1g/ 3TX/bmHOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAi9m4MC/b6F2ZkCm0Ok5j2 Ub/p+rdN7oUvNzAsOBczsZLjqsbLzltRvZ7PyuWmLlykDQA= 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: comedi: vmk80xx: fix incomplete endpoint checking While vmk80xx does have endpoint checking implemented, some things can fall through the cracks. Depending on the hardware model, URBs can have either bulk or interrupt type, and current version of vmk80xx_find_usb_endpoints() function does not take that fully into account. While this warning does not seem to be too harmful, at the very least it will crash systems with 'panic_on_warn' set on them. Fix the issue found by Syzkaller [1] by somewhat simplifying the endpoint checking process with usb_find_common_endpoints() and ensuring that only expected endpoint types are present. This patch has not been tested on real hardware. [1] Syzkaller report: usb 1-1: BOGUS urb xfer, pipe 1 != type 3 WARNING: CPU: 0 PID: 781 at drivers/usb/core/urb.c:504 usb_submit_urb+0xc4e/0x18c0 drivers/usb/core/urb.c:503 ... Call Trace: usb_start_wait_urb+0x113/0x520 drivers/usb/core/message.c:59 vmk80xx_reset_device drivers/comedi/drivers/vmk80xx.c:227 [inline] vmk80xx_auto_attach+0xa1c/0x1a40 drivers/comedi/drivers/vmk80xx.c:818 comedi_auto_config+0x238/0x380 drivers/comedi/drivers.c:1067 usb_probe_interface+0x5cd/0xb00 drivers/usb/core/driver.c:399 ... Similar issue also found by Syzkaller: The Linux kernel CVE team has assigned CVE-2024-27001 to this issue. Affected and fixed versions =========================== Issue introduced in 3.9 with commit 49253d542cc0 and fixed in 5.15.157 with commit b0b268eeb087 Issue introduced in 3.9 with commit 49253d542cc0 and fixed in 6.1.88 with commit ac882d6b21bf Issue introduced in 3.9 with commit 49253d542cc0 and fixed in 6.6.29 with commit 59f33af97961 Issue introduced in 3.9 with commit 49253d542cc0 and fixed in 6.8.8 with commit 6ec3514a7d35 Issue introduced in 3.9 with commit 49253d542cc0 and fixed in 6.9-rc5 with commit d1718530e3f6 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-2024-27001 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/comedi/drivers/vmk80xx.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/b0b268eeb087e324ef3ea71f8e6cabd07630517f https://git.kernel.org/stable/c/ac882d6b21bffecb57bcc4486701239eef5aa67b https://git.kernel.org/stable/c/59f33af9796160f851641d960bd93937f282c696 https://git.kernel.org/stable/c/6ec3514a7d35ad9cfab600187612c29f669069d2 https://git.kernel.org/stable/c/d1718530e3f640b7d5f0050e725216eab57a85d8