net: dsa: realtek: fix out-of-bounds access
In the Linux kernel, the following vulnerability has been resolved: net: dsa: realtek: fix out-of-bounds access The probe function sets priv->chip_data to (void *)priv + sizeof(*priv) with the expectation that priv has enough trailing space. However, only realtek-smi actually allocated this chip_data space. Do likewise in realtek-mdio to fix out-of-bounds accesses. These accesses likely went unnoticed so far, because of an (unused) buf[4096] member in struct realtek_priv, which caused kmalloc to round up the allocated buffer to a big enough size, so nothing of value was overwritten. With a different allocator (like in the barebox bootloader port of the driver) or with KASAN, the memory corruption becomes quickly apparent.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.1.23, 6.2.10
- CVEs
- CVE-2023-54065
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 22:39 UTC · Revision 1
Source evidence
net: dsa: realtek: fix out-of-bounds access
core-osv · Original sourcePublished 24 Dec 2025, 12:23 UTC
In the Linux kernel, the following vulnerability has been resolved: net: dsa: realtek: fix out-of-bounds access The probe function sets priv->chip_data to (void *)priv + sizeof(*priv) with the expectation that priv has enough trailing space. However, only realtek-smi actually allocated this chip_data space. Do likewise in realtek-mdio to fix out-of-bounds accesses. These accesses likely went unnoticed so far, because of an (unused) buf[4096] member in struct realtek_priv, which caused kmalloc to round up the allocated buffer to a big enough size, so nothing of value was overwritten. With a different allocator (like in the barebox bootloader port of the driver) or with KASAN, the memory corruption becomes quickly apparent.
osv:CVE-2023-54065
Kernel
Fixed versions: 6.1.23, 6.2.10
Complete source record
{
"id": "fbc1206ef8d6bfd8d1e3b0f5591d989827b1c4b5f9eb5bd64fe7768abf29e138",
"url": "https://osv.dev/vulnerability/CVE-2023-54065",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "net: dsa: realtek: fix out-of-bounds access",
"summary": "In the Linux kernel, the following vulnerability has been resolved: net: dsa: realtek: fix out-of-bounds access The probe function sets priv->chip_data to (void *)priv + sizeof(*priv) with the expectation that priv has enough trailing space. However, only realtek-smi actually allocated this chip_data space. Do likewise in realtek-mdio to fix out-of-bounds accesses. These accesses likely went unnoticed so far, because of an (unused) buf[4096] member in struct realtek_priv, which caused kmalloc to round up the allocated buffer to a big enough size, so nothing of value was overwritten. With a different allocator (like in the barebox bootloader port of the driver) or with KASAN, the memory corruption becomes quickly apparent.",
"evidence": "osv:CVE-2023-54065",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.1.23",
"evidence": "/affected/1/ranges"
},
{
"value": "6.2.10",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "CVE-2023-54065",
"aliases": [
"CVE-2023-54065"
],
"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": "aac94001067da183455d6d37959892744fa01d9d"
},
{
"fixed": "cc0f9bb99735d2b68fac68f37b585d615728ce5b"
},
{
"fixed": "fe668aa499b4b95425044ba11af9609db6ecf466"
},
{
"fixed": "b93eb564869321d0dffaf23fcc5c88112ed62466"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-54065.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.18.0"
},
{
"fixed": "6.1.23"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.2.0"
},
{
"fixed": "6.2.10"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-54065.json"
}
}
],
"modified": "2026-10-28T02:30:31.963484244Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/b93eb564869321d0dffaf23fcc5c88112ed62466",
"https://git.kernel.org/stable/c/cc0f9bb99735d2b68fac68f37b585d615728ce5b",
"https://git.kernel.org/stable/c/fe668aa499b4b95425044ba11af9609db6ecf466",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54065.json",
"https://nvd.nist.gov/vuln/detail/CVE-2023-54065",
"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/2023/54xxx/CVE-2023-54065.json"
}
},
"related_cves": [
{
"value": "CVE-2023-54065",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 499171,
"published_at": "2025-12-24T12:23:10.745+00:00"
}