mtd: spi-nor: debugfs: fix out-of-bounds read in spi_nor_params_show()
In the Linux kernel, the following vulnerability has been resolved: mtd: spi-nor: debugfs: fix out-of-bounds read in spi_nor_params_show() Sashiko noticed an out-of-bounds read [1]. In spi_nor_params_show(), the snor_f_names array is passed to spi_nor_print_flags() using sizeof(snor_f_names). Since snor_f_names is an array of pointers, sizeof() returns the total number of bytes occupied by the pointers (element_count * sizeof(void *)) rather than the element count itself. On 64-bit systems, this makes the passed length 8x larger than intended. Inside spi_nor_print_flags(), the 'names_len' argument is used to bounds-check the 'names' array access. An out-of-bounds read occurs if a flag bit is set that exceeds the array's actual element count but is within the inflated byte-size count. Correct this by using ARRAY_SIZE() to pass the actual number of string pointers in the array.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.1.176, 6.12.88, 6.18.30, 6.6.140, 7.0.7
- CVEs
- CVE-2026-46190
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 05:34 UTC · Revision 1
Source evidence
mtd: spi-nor: debugfs: fix out-of-bounds read in spi_nor_params_show()
core-osv · Original sourcePublished 28 May 2026, 09:36 UTC
In the Linux kernel, the following vulnerability has been resolved: mtd: spi-nor: debugfs: fix out-of-bounds read in spi_nor_params_show() Sashiko noticed an out-of-bounds read [1]. In spi_nor_params_show(), the snor_f_names array is passed to spi_nor_print_flags() using sizeof(snor_f_names). Since snor_f_names is an array of pointers, sizeof() returns the total number of bytes occupied by the pointers (element_count * sizeof(void *)) rather than the element count itself. On 64-bit systems, this makes the passed length 8x larger than intended. Inside spi_nor_print_flags(), the 'names_len' argument is used to bounds-check the 'names' array access. An out-of-bounds read occurs if a flag bit is set that exceeds the array's actual element count but is within the inflated byte-size count. Correct this by using ARRAY_SIZE() to pass the actual number of string pointers in the array.
osv:CVE-2026-46190
Kernel
Fixed versions: 6.1.176, 6.6.140, 6.12.88, 6.18.30, 7.0.7
Complete source record
{
"id": "de9347a5ee21c8f86331a4a4304698d2ee5f258521690fde53ee9e341aa9afda",
"url": "https://osv.dev/vulnerability/CVE-2026-46190",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "mtd: spi-nor: debugfs: fix out-of-bounds read in spi_nor_params_show()",
"summary": "In the Linux kernel, the following vulnerability has been resolved: mtd: spi-nor: debugfs: fix out-of-bounds read in spi_nor_params_show() Sashiko noticed an out-of-bounds read [1]. In spi_nor_params_show(), the snor_f_names array is passed to spi_nor_print_flags() using sizeof(snor_f_names). Since snor_f_names is an array of pointers, sizeof() returns the total number of bytes occupied by the pointers (element_count * sizeof(void *)) rather than the element count itself. On 64-bit systems, this makes the passed length 8x larger than intended. Inside spi_nor_print_flags(), the 'names_len' argument is used to bounds-check the 'names' array access. An out-of-bounds read occurs if a flag bit is set that exceeds the array's actual element count but is within the inflated byte-size count. Correct this by using ARRAY_SIZE() to pass the actual number of string pointers in the array.",
"evidence": "osv:CVE-2026-46190",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.1.176",
"evidence": "/affected/1/ranges"
},
{
"value": "6.6.140",
"evidence": "/affected/1/ranges"
},
{
"value": "6.12.88",
"evidence": "/affected/1/ranges"
},
{
"value": "6.18.30",
"evidence": "/affected/1/ranges"
},
{
"value": "7.0.7",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "CVE-2026-46190",
"aliases": [
"CVE-2026-46190"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "0257be79fc4a16a3252ce80aa13b3640f728c425"
},
{
"fixed": "231b8e1f604f6e0a7e100536f506cdf482e2c5f5"
},
{
"fixed": "9a80c458320e0514e11945402dd6e48fcee05524"
},
{
"fixed": "ca18c180b053f6ce80394322b314ac721c316af7"
},
{
"fixed": "34bdcfb496b29f9a52431194f94473b37fb8c162"
},
{
"fixed": "c0b654bc0b76a1da102d9138be1ed1223bd99310"
},
{
"fixed": "e47029b977e747cb3a9174308fd55762cce70147"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-46190.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.19.0"
},
{
"fixed": "6.1.176"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.2.0"
},
{
"fixed": "6.6.140"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.7.0"
},
{
"fixed": "6.12.88"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.18.30"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.19.0"
},
{
"fixed": "7.0.7"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-46190.json"
}
}
],
"modified": "2026-10-28T02:30:26.473003466Z",
"provider": "osv",
"references": [
"https://cert-portal.siemens.com/productcert/html/ssa-784472.html",
"https://git.kernel.org/stable/c/231b8e1f604f6e0a7e100536f506cdf482e2c5f5",
"https://git.kernel.org/stable/c/34bdcfb496b29f9a52431194f94473b37fb8c162",
"https://git.kernel.org/stable/c/9a80c458320e0514e11945402dd6e48fcee05524",
"https://git.kernel.org/stable/c/c0b654bc0b76a1da102d9138be1ed1223bd99310",
"https://git.kernel.org/stable/c/ca18c180b053f6ce80394322b314ac721c316af7",
"https://git.kernel.org/stable/c/e47029b977e747cb3a9174308fd55762cce70147",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/46xxx/CVE-2026-46190.json",
"https://nvd.nist.gov/vuln/detail/CVE-2026-46190",
"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/2026/46xxx/CVE-2026-46190.json"
}
},
"related_cves": [
{
"value": "CVE-2026-46190",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 492754,
"published_at": "2026-05-28T09:36:44.017+00:00"
}