spi: ch341: fix out-of-bounds memory access in ch341_transfer_one
In the Linux kernel, the following vulnerability has been resolved: spi: ch341: fix out-of-bounds memory access in ch341_transfer_one Discovered by Atuin - Automated Vulnerability Discovery Engine. The 'len' variable is calculated as 'min(32, trans->len + 1)', which includes the 1-byte command header. When copying data from 'trans->tx_buf' to 'ch341->tx_buf + 1', using 'len' as the length is incorrect because: 1. It causes an out-of-bounds read from 'trans->tx_buf' (which has size 'trans->len', i.e., 'len - 1' in this context). 2. It can cause an out-of-bounds write to 'ch341->tx_buf' if 'len' is CH341_PACKET_LENGTH (32). Writing 32 bytes to ch341->tx_buf + 1 overflows the buffer. Fix this by copying 'len - 1' bytes.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.12.63, 6.17.13, 6.18.2
- CVEs
- CVE-2025-68352
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 6 Nov 2026, 01:42 UTC · Revision 1
Source evidence
spi: ch341: fix out-of-bounds memory access in ch341_transfer_one
core-osv · Original sourcePublished 24 Dec 2025, 10:32 UTC
In the Linux kernel, the following vulnerability has been resolved: spi: ch341: fix out-of-bounds memory access in ch341_transfer_one Discovered by Atuin - Automated Vulnerability Discovery Engine. The 'len' variable is calculated as 'min(32, trans->len + 1)', which includes the 1-byte command header. When copying data from 'trans->tx_buf' to 'ch341->tx_buf + 1', using 'len' as the length is incorrect because: 1. It causes an out-of-bounds read from 'trans->tx_buf' (which has size 'trans->len', i.e., 'len - 1' in this context). 2. It can cause an out-of-bounds write to 'ch341->tx_buf' if 'len' is CH341_PACKET_LENGTH (32). Writing 32 bytes to ch341->tx_buf + 1 overflows the buffer. Fix this by copying 'len - 1' bytes.
osv:CVE-2025-68352
Kernel
Fixed versions: 6.12.63, 6.17.13, 6.18.2
Complete source record
{
"id": "100fb55a4ffcd9b886dac0a53a878f50c36274235baa42f254450b7b35667080",
"url": "https://osv.dev/vulnerability/CVE-2025-68352",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "spi: ch341: fix out-of-bounds memory access in ch341_transfer_one",
"summary": "In the Linux kernel, the following vulnerability has been resolved: spi: ch341: fix out-of-bounds memory access in ch341_transfer_one Discovered by Atuin - Automated Vulnerability Discovery Engine. The 'len' variable is calculated as 'min(32, trans->len + 1)', which includes the 1-byte command header. When copying data from 'trans->tx_buf' to 'ch341->tx_buf + 1', using 'len' as the length is incorrect because: 1. It causes an out-of-bounds read from 'trans->tx_buf' (which has size 'trans->len', i.e., 'len - 1' in this context). 2. It can cause an out-of-bounds write to 'ch341->tx_buf' if 'len' is CH341_PACKET_LENGTH (32). Writing 32 bytes to ch341->tx_buf + 1 overflows the buffer. Fix this by copying 'len - 1' bytes.",
"evidence": "osv:CVE-2025-68352",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.12.63",
"evidence": "/affected/1/ranges"
},
{
"value": "6.17.13",
"evidence": "/affected/1/ranges"
},
{
"value": "6.18.2",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "CVE-2025-68352",
"aliases": [
"CVE-2025-68352"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "8846739f52afa07e63395c80227dc544f54bd7b1"
},
{
"fixed": "cad6c0fd6f3c0e76a1f75df4bce3b08a13f08974"
},
{
"fixed": "ea1e43966cd03098fcd5f0d72e6c2901d45fa08d"
},
{
"fixed": "81841da1f30f66a850cc8796d99ba330aad9d696"
},
{
"fixed": "545d1287e40a55242f6ab68bcc1ba3b74088b1bc"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-68352.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.11.0"
},
{
"fixed": "6.12.63"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.17.13"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.18.0"
},
{
"fixed": "6.18.2"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-68352.json"
}
}
],
"modified": "2026-10-28T02:30:45.889365464Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/545d1287e40a55242f6ab68bcc1ba3b74088b1bc",
"https://git.kernel.org/stable/c/81841da1f30f66a850cc8796d99ba330aad9d696",
"https://git.kernel.org/stable/c/cad6c0fd6f3c0e76a1f75df4bce3b08a13f08974",
"https://git.kernel.org/stable/c/ea1e43966cd03098fcd5f0d72e6c2901d45fa08d",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/68xxx/CVE-2025-68352.json",
"https://nvd.nist.gov/vuln/detail/CVE-2025-68352",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/68xxx/CVE-2025-68352.json"
}
},
"related_cves": [
{
"value": "CVE-2025-68352",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 513962,
"published_at": "2025-12-24T10:32:43.366+00:00"
}