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 F006331CA4A for ; Wed, 24 Dec 2025 10:59:49 +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=1766573990; cv=none; b=K1M8EON28FipMQoUmYVBb28Ca4AV9TEe/pLh/kOcg5CAk6UHKRknBvN2RJoxXuhF3x9haTRwuhm7DzcMXqfOwJoJRUq/bQZQHhinIucLJ4RoGywMBMgWLZ2kGKQXL8AAhM227Ln4cPYqDVPY0rWEd+x2cX5a9/UHDnaIMCYgZt4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766573990; c=relaxed/simple; bh=LD6Qz3i1pUFdJlHsxGEgaU7zma3rzmuEdhm8VweXQwM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=uNeLWuCA8v5lVxhouJmBLdwUAEuU1J/vZPPRFDhW6DXHBLnVoyVdMKYnMlSBoXvJUzEdQxDScUhLkx7hYuXimPSjqdyk8AMp3k3D9DqUKP+HxhljwcVe9Vpo8hPKhpEVS4GQeE8dC4gllvuuDLIl4hdUVFbD5zs+3AqBNb5qmB8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=f33+SlRd; 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="f33+SlRd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25CB6C116B1; Wed, 24 Dec 2025 10:59:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1766573989; bh=LD6Qz3i1pUFdJlHsxGEgaU7zma3rzmuEdhm8VweXQwM=; h=From:To:Cc:Subject:Date:Reply-To:From; b=f33+SlRdjJ+LLlhAvzXR+xmBkphEo2+7nP74ZciRR3tzBFEwYObz4fDUQjvZzO3jO xCSmevY/fjMNb/9ZfvJ8zwAZqOqSfeT5iTwFfvk7UTZXXasOTt75HCAaVy2BflOfF8 1hmvO19qQdRaM4c5NztMTQ/l7ZVA3R5HqvRNUgNg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-54039: can: j1939: j1939_tp_tx_dat_new(): fix out-of-bounds memory access Date: Wed, 24 Dec 2025 11:57:23 +0100 Message-ID: <2025122439-CVE-2023-54039-82a4@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=3522; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=bPOAHw02hmz/Ss9Ony9FiGC4Q4+jRV/eBf96CbVedYc=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnex55Pi5Zuub017IeFfovrUsPjJ1rP/7v6U7GNjclJa q5S8gHJjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjIDTuGebpaQjNf569Qcvna MfU4i5esgqj7P4a5ciW7lnQzsIick85Zs6z+f2mSrrYvAA== 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: j1939: j1939_tp_tx_dat_new(): fix out-of-bounds memory access In the j1939_tp_tx_dat_new() function, an out-of-bounds memory access could occur during the memcpy() operation if the size of skb->cb is larger than the size of struct j1939_sk_buff_cb. This is because the memcpy() operation uses the size of skb->cb, leading to a read beyond the struct j1939_sk_buff_cb. Updated the memcpy() operation to use the size of struct j1939_sk_buff_cb instead of the size of skb->cb. This ensures that the memcpy() operation only reads the memory within the bounds of struct j1939_sk_buff_cb, preventing out-of-bounds memory access. Additionally, add a BUILD_BUG_ON() to check that the size of skb->cb is greater than or equal to the size of struct j1939_sk_buff_cb. This ensures that the skb->cb buffer is large enough to hold the j1939_sk_buff_cb structure. [mkl: rephrase commit message] The Linux kernel CVE team has assigned CVE-2023-54039 to this issue. Affected and fixed versions =========================== Issue introduced in 5.4 with commit 9d71dd0c70099914fcd063135da3c580865e924c and fixed in 5.4.241 with commit d2136f05690c272dfc9f9d6efcc51d5f53494b33 Issue introduced in 5.4 with commit 9d71dd0c70099914fcd063135da3c580865e924c and fixed in 5.10.178 with commit 70caa596d158a5d84b117f722d58f3ea503a5ba9 Issue introduced in 5.4 with commit 9d71dd0c70099914fcd063135da3c580865e924c and fixed in 5.15.107 with commit 4fe1d9b6231a68ffc91318f57fd8e4982f028cf7 Issue introduced in 5.4 with commit 9d71dd0c70099914fcd063135da3c580865e924c and fixed in 6.1.24 with commit 4c3fb22a6ec68258ee129a2e6b720f43dffc562f Issue introduced in 5.4 with commit 9d71dd0c70099914fcd063135da3c580865e924c and fixed in 6.2.11 with commit 36befc9aed6202b4a9b906529aea13eacd7e34ff Issue introduced in 5.4 with commit 9d71dd0c70099914fcd063135da3c580865e924c and fixed in 6.3 with commit b45193cb4df556fe6251b285a5ce44046dd36b4a 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-2023-54039 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/can/j1939/transport.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/d2136f05690c272dfc9f9d6efcc51d5f53494b33 https://git.kernel.org/stable/c/70caa596d158a5d84b117f722d58f3ea503a5ba9 https://git.kernel.org/stable/c/4fe1d9b6231a68ffc91318f57fd8e4982f028cf7 https://git.kernel.org/stable/c/4c3fb22a6ec68258ee129a2e6b720f43dffc562f https://git.kernel.org/stable/c/36befc9aed6202b4a9b906529aea13eacd7e34ff https://git.kernel.org/stable/c/b45193cb4df556fe6251b285a5ce44046dd36b4a