CVE-2025-38266 (GCVE-0-2025-38266)
Vulnerability from cvelistv5
Published
2025-07-10 07:37
Modified
2025-07-28 04:16
Severity ?
VLAI Severity ?
EPSS score ?
Summary
In the Linux kernel, the following vulnerability has been resolved:
pinctrl: mediatek: eint: Fix invalid pointer dereference for v1 platforms
Commit 3ef9f710efcb ("pinctrl: mediatek: Add EINT support for multiple
addresses") introduced an access to the 'soc' field of struct
mtk_pinctrl in mtk_eint_do_init() and for that an include of
pinctrl-mtk-common-v2.h.
However, pinctrl drivers relying on the v1 common driver include
pinctrl-mtk-common.h instead, which provides another definition of
struct mtk_pinctrl that does not contain an 'soc' field.
Since mtk_eint_do_init() can be called both by v1 and v2 drivers, it
will now try to dereference an invalid pointer when called on v1
platforms. This has been observed on Genio 350 EVK (MT8365), which
crashes very early in boot (the kernel trace can only be seen with
earlycon).
In order to fix this, since 'struct mtk_pinctrl' was only needed to get
a 'struct mtk_eint_pin', make 'struct mtk_eint_pin' a parameter
of mtk_eint_do_init() so that callers need to supply it, removing
mtk_eint_do_init()'s dependency on any particular 'struct mtk_pinctrl'.
References
Impacted products
{ "containers": { "cna": { "affected": [ { "defaultStatus": "unaffected", "product": "Linux", "programFiles": [ "drivers/pinctrl/mediatek/mtk-eint.c", "drivers/pinctrl/mediatek/mtk-eint.h", "drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c", "drivers/pinctrl/mediatek/pinctrl-mtk-common.c" ], "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "vendor": "Linux", "versions": [ { "lessThan": "9ebe21ede792cef851847648962c363cac67d17f", "status": "affected", "version": "3ef9f710efcb5cc1335b5b09c16c757f703d7e5f", "versionType": "git" }, { "lessThan": "1c9977b263475373b31bbf86af94a5c9ae2be42c", "status": "affected", "version": "3ef9f710efcb5cc1335b5b09c16c757f703d7e5f", "versionType": "git" } ] }, { "defaultStatus": "affected", "product": "Linux", "programFiles": [ "drivers/pinctrl/mediatek/mtk-eint.c", "drivers/pinctrl/mediatek/mtk-eint.h", "drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c", "drivers/pinctrl/mediatek/pinctrl-mtk-common.c" ], "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "vendor": "Linux", "versions": [ { "status": "affected", "version": "6.15" }, { "lessThan": "6.15", "status": "unaffected", "version": "0", "versionType": "semver" }, { "lessThanOrEqual": "6.15.*", "status": "unaffected", "version": "6.15.2", "versionType": "semver" }, { "lessThanOrEqual": "*", "status": "unaffected", "version": "6.16", "versionType": "original_commit_for_fix" } ] } ], "cpeApplicability": [ { "nodes": [ { "cpeMatch": [ { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.15.2", "versionStartIncluding": "6.15", "vulnerable": true }, { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.16", "versionStartIncluding": "6.15", "vulnerable": true } ], "negate": false, "operator": "OR" } ] } ], "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\npinctrl: mediatek: eint: Fix invalid pointer dereference for v1 platforms\n\nCommit 3ef9f710efcb (\"pinctrl: mediatek: Add EINT support for multiple\naddresses\") introduced an access to the \u0027soc\u0027 field of struct\nmtk_pinctrl in mtk_eint_do_init() and for that an include of\npinctrl-mtk-common-v2.h.\n\nHowever, pinctrl drivers relying on the v1 common driver include\npinctrl-mtk-common.h instead, which provides another definition of\nstruct mtk_pinctrl that does not contain an \u0027soc\u0027 field.\n\nSince mtk_eint_do_init() can be called both by v1 and v2 drivers, it\nwill now try to dereference an invalid pointer when called on v1\nplatforms. This has been observed on Genio 350 EVK (MT8365), which\ncrashes very early in boot (the kernel trace can only be seen with\nearlycon).\n\nIn order to fix this, since \u0027struct mtk_pinctrl\u0027 was only needed to get\na \u0027struct mtk_eint_pin\u0027, make \u0027struct mtk_eint_pin\u0027 a parameter\nof mtk_eint_do_init() so that callers need to supply it, removing\nmtk_eint_do_init()\u0027s dependency on any particular \u0027struct mtk_pinctrl\u0027." } ], "providerMetadata": { "dateUpdated": "2025-07-28T04:16:45.466Z", "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux" }, "references": [ { "url": "https://git.kernel.org/stable/c/9ebe21ede792cef851847648962c363cac67d17f" }, { "url": "https://git.kernel.org/stable/c/1c9977b263475373b31bbf86af94a5c9ae2be42c" } ], "title": "pinctrl: mediatek: eint: Fix invalid pointer dereference for v1 platforms", "x_generator": { "engine": "bippy-1.2.0" } } }, "cveMetadata": { "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "assignerShortName": "Linux", "cveId": "CVE-2025-38266", "datePublished": "2025-07-10T07:37:34.431Z", "dateReserved": "2025-04-16T04:51:23.998Z", "dateUpdated": "2025-07-28T04:16:45.466Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1", "vulnerability-lookup:meta": { "nvd": "{\"cve\":{\"id\":\"CVE-2025-38266\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-07-10T08:15:24.727\",\"lastModified\":\"2025-07-10T13:17:30.017\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\npinctrl: mediatek: eint: Fix invalid pointer dereference for v1 platforms\\n\\nCommit 3ef9f710efcb (\\\"pinctrl: mediatek: Add EINT support for multiple\\naddresses\\\") introduced an access to the \u0027soc\u0027 field of struct\\nmtk_pinctrl in mtk_eint_do_init() and for that an include of\\npinctrl-mtk-common-v2.h.\\n\\nHowever, pinctrl drivers relying on the v1 common driver include\\npinctrl-mtk-common.h instead, which provides another definition of\\nstruct mtk_pinctrl that does not contain an \u0027soc\u0027 field.\\n\\nSince mtk_eint_do_init() can be called both by v1 and v2 drivers, it\\nwill now try to dereference an invalid pointer when called on v1\\nplatforms. This has been observed on Genio 350 EVK (MT8365), which\\ncrashes very early in boot (the kernel trace can only be seen with\\nearlycon).\\n\\nIn order to fix this, since \u0027struct mtk_pinctrl\u0027 was only needed to get\\na \u0027struct mtk_eint_pin\u0027, make \u0027struct mtk_eint_pin\u0027 a parameter\\nof mtk_eint_do_init() so that callers need to supply it, removing\\nmtk_eint_do_init()\u0027s dependency on any particular \u0027struct mtk_pinctrl\u0027.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: pinctrl: mediatek: eint: Correcci\u00f3n de la desreferencia de puntero no v\u00e1lida para plataformas v1. El commit 3ef9f710efcb (\\\"pinctrl: mediatek: A\u00f1adir compatibilidad con EINT para m\u00faltiples direcciones\\\") introdujo un acceso al campo \u0027soc\u0027 de struct mtk_pinctrl en mtk_eint_do_init() y, para ello, la inclusi\u00f3n de pinctrl-mtk-common-v2.h. Sin embargo, los controladores pinctrl que dependen del controlador com\u00fan v1 incluyen pinctrl-mtk-common.h, que proporciona otra definici\u00f3n de struct mtk_pinctrl que no contiene el campo \u0027soc\u0027. Dado que mtk_eint_do_init() puede ser invocado tanto por controladores v1 como v2, ahora intentar\u00e1 desreferenciar un puntero no v\u00e1lido al invocarlo en plataformas v1. Esto se ha observado en Genio 350 EVK (MT8365), que se bloquea al inicio (la traza del kernel solo se puede ver con earlycon). Para solucionarlo, dado que \u0027struct mtk_pinctrl\u0027 solo era necesario para obtener un \u0027struct mtk_eint_pin\u0027, se debe convertir \u0027struct mtk_eint_pin\u0027 en un par\u00e1metro de mtk_eint_do_init() para que quienes lo invoquen deban proporcionarlo, eliminando as\u00ed la dependencia de mtk_eint_do_init() de cualquier \u0027struct mtk_pinctrl\u0027 en particular.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/1c9977b263475373b31bbf86af94a5c9ae2be42c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/9ebe21ede792cef851847648962c363cac67d17f\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}" } }
Loading…
Loading…
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.
Loading…
Loading…