pinctrl: generic: free maps on pinctrl_generic_to_map() failure
In the Linux kernel, the following vulnerability has been resolved: pinctrl: generic: free maps on pinctrl_generic_to_map() failure pinctrl_generic_to_map() parses DT configuration and allocates pinctrl maps via pinctrl_utils_reserve_map(). If subsequent steps (such as pinctrl_utils_add_map_mux(), pinctrl_generic_add_group(), pinconf_generic_parse_dt_config(), or pinctrl_utils_add_map_configs()) return an error, *maps may contain partially allocated map entries. Returning the error directly without freeing *maps leaks the allocated mapping memory across all drivers that rely on pinctrl_generic_to_map(). Fix this by calling pinctrl_utils_free_map() and resetting *maps, *num_maps, and *num_reserved_maps in the error path of pinctrl_generic_to_map().
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 7.2.6
- CVEs
- CVE-2026-90340
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 03:38 UTC · Revision 1
Source evidence
pinctrl: generic: free maps on pinctrl_generic_to_map() failure
core-osv · Original sourcePublished 17 Sept 2026, 16:08 UTC
In the Linux kernel, the following vulnerability has been resolved: pinctrl: generic: free maps on pinctrl_generic_to_map() failure pinctrl_generic_to_map() parses DT configuration and allocates pinctrl maps via pinctrl_utils_reserve_map(). If subsequent steps (such as pinctrl_utils_add_map_mux(), pinctrl_generic_add_group(), pinconf_generic_parse_dt_config(), or pinctrl_utils_add_map_configs()) return an error, *maps may contain partially allocated map entries. Returning the error directly without freeing *maps leaks the allocated mapping memory across all drivers that rely on pinctrl_generic_to_map(). Fix this by calling pinctrl_utils_free_map() and resetting *maps, *num_maps, and *num_reserved_maps in the error path of pinctrl_generic_to_map().
osv:CVE-2026-90340
Kernel
Fixed versions: 7.2.6
Complete source record
{
"id": "3940877a71021dbdfec351bcd995c047a45ea1436c0486f9debc1f4732a07769",
"url": "https://osv.dev/vulnerability/CVE-2026-90340",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "pinctrl: generic: free maps on pinctrl_generic_to_map() failure",
"summary": "In the Linux kernel, the following vulnerability has been resolved: pinctrl: generic: free maps on pinctrl_generic_to_map() failure pinctrl_generic_to_map() parses DT configuration and allocates pinctrl maps via pinctrl_utils_reserve_map(). If subsequent steps (such as pinctrl_utils_add_map_mux(), pinctrl_generic_add_group(), pinconf_generic_parse_dt_config(), or pinctrl_utils_add_map_configs()) return an error, *maps may contain partially allocated map entries. Returning the error directly without freeing *maps leaks the allocated mapping memory across all drivers that rely on pinctrl_generic_to_map(). Fix this by calling pinctrl_utils_free_map() and resetting *maps, *num_maps, and *num_reserved_maps in the error path of pinctrl_generic_to_map().",
"evidence": "osv:CVE-2026-90340",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "7.2.6",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2026-90340",
"aliases": [
"CVE-2026-90340"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "aaaf31be04260316036f50a05b7d015c0d36b55a"
},
{
"fixed": "09f47abc95ee9e819e7e93cd68c1c23abe11c842"
},
{
"fixed": "17007cd700601777d9ee203a13d97e64ece3a10f"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-90340.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "7.2.0"
},
{
"fixed": "7.2.6"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-90340.json"
}
}
],
"modified": "2026-10-28T02:30:32.736290183Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/09f47abc95ee9e819e7e93cd68c1c23abe11c842",
"https://git.kernel.org/stable/c/17007cd700601777d9ee203a13d97e64ece3a10f",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/90xxx/CVE-2026-90340.json",
"https://nvd.nist.gov/vuln/detail/CVE-2026-90340",
"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/90xxx/CVE-2026-90340.json"
}
},
"related_cves": [
{
"value": "CVE-2026-90340",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 500070,
"published_at": "2026-09-17T16:08:51.635+00:00"
}