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 996F82DE1E0 for ; Tue, 23 Dec 2025 13:58:57 +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=1766498337; cv=none; b=JaMzVas7p0YYrrjNUHy0GZBdlc165s7Y1iQn+1WiNVeYPNAjSCas49uLxOmCanYVcNVQe2FYlUrQC0d2DGp1xi8Qr6vIRKQxN0AliO7a7ap35i9I78iNESvBhOMQps3ksukuN9sMBov0HofmV86ErAGbUmGM24QqOc3Ebx7/i40= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766498337; c=relaxed/simple; bh=HnXBA/fxUNasL+98xoIzHAjNikqjpa+WHeVDjZpWVI8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=TN8bl62cG6u0D6aU/+60nsxF1DLi0tMLTHWBfsMy7s3Gx39Jy5KLEyLaO7YxViYU9BIDWRqOLQm6qWk9hIvhp9ibqm5YptkMGvnhKV4skfWdyIOZzJxzATLaEi4PULD3liWgVsEIz9BZr1f+xiNZGSi80gUe4sAvX6KpLHq3ToM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=L/lLOi1e; 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="L/lLOi1e" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 37EE3C113D0; Tue, 23 Dec 2025 13:58:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1766498336; bh=HnXBA/fxUNasL+98xoIzHAjNikqjpa+WHeVDjZpWVI8=; h=From:To:Cc:Subject:Date:Reply-To:From; b=L/lLOi1eXt6Jv5gqXRmdAmLbx0GJTMGRzqigmLltX/uPpjNUO/EheIwgc9Dym9ZQ+ hbDIRDtJEmH6SNK1yGeFzOeep42XVq6nIxndf4Rif2BDJ+p5/7qUscfw8Gth//ayGy WRfNqisLdCAlbUgvxLepnk4hr4x4nnF/BK++lhXs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-68342: can: gs_usb: gs_usb_receive_bulk_callback(): check actual_length before accessing data Date: Tue, 23 Dec 2025 14:58:36 +0100 Message-ID: <2025122332-CVE-2025-68342-7f69@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2767; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=o41pV2D7SlSGE1j5cWyRHwG/FyN020/bNGx/c0GIaC0=; b=owGbwMvMwCRo6H6F97bub03G02pJDJleCzh1P7Nfn8auyvSXbZ9ak8it0NDl/qGFv/pWHON80 MaptjOnI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACbySZdhwZam7MaDE6Z5nmm/ sdXO5bCQ+Fn2gwxzJYTuX4koUN654mpZ+I7/V0IvS9ctBQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: can: gs_usb: gs_usb_receive_bulk_callback(): check actual_length before accessing data The URB received in gs_usb_receive_bulk_callback() contains a struct gs_host_frame. The length of the data after the header depends on the gs_host_frame hf::flags and the active device features (e.g. time stamping). Introduce a new function gs_usb_get_minimum_length() and check that we have at least received the required amount of data before accessing it. Only copy the data to that skb that has actually been received. [mkl: rename gs_usb_get_minimum_length() -> +gs_usb_get_minimum_rx_length()] The Linux kernel CVE team has assigned CVE-2025-68342 to this issue. Affected and fixed versions =========================== Issue introduced in 3.16 with commit d08e973a77d128b25e01a08c34d89593fdf222da and fixed in 6.6.119 with commit 4ffac725154cf6a253f5e6aa0c8946232b6a0af5 Issue introduced in 3.16 with commit d08e973a77d128b25e01a08c34d89593fdf222da and fixed in 6.12.61 with commit ad55004a3cb5b41ef78aa6c09e7bc5a489ba652b Issue introduced in 3.16 with commit d08e973a77d128b25e01a08c34d89593fdf222da and fixed in 6.17.11 with commit fb0c7c77a7ae3a2c3404b7d0173b8739a754b513 Issue introduced in 3.16 with commit d08e973a77d128b25e01a08c34d89593fdf222da and fixed in 6.18 with commit 395d988f93861101ec89d0dd9e3b876ae9392a5b 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-2025-68342 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/gs_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/4ffac725154cf6a253f5e6aa0c8946232b6a0af5 https://git.kernel.org/stable/c/ad55004a3cb5b41ef78aa6c09e7bc5a489ba652b https://git.kernel.org/stable/c/fb0c7c77a7ae3a2c3404b7d0173b8739a754b513 https://git.kernel.org/stable/c/395d988f93861101ec89d0dd9e3b876ae9392a5b