rtc: mpfs: fix unchecked devm_clk_get() error pointer in probe()
In the Linux kernel, the following vulnerability has been resolved: rtc: mpfs: fix unchecked devm_clk_get() error pointer in probe() devm_clk_get(&pdev->dev, "rtcref")'s return value was passed straight into clk_get_rate() without checking it for an error first, unlike the "rtc" clock a few lines above which is correctly checked with IS_ERR(). clk_get_rate() only guards against a NULL clk, not an error pointer: if (!clk) return 0; ... rate = clk_core_get_rate_recalc(clk->core); so if devm_clk_get() ever returns an error pointer here (for example ERR_PTR(-EPROBE_DEFER), which is the normal, expected outcome if the clkcfg clock-provider this RTC depends on has not registered its clocks yet by the time this driver probes), clk_get_rate() dereferences that error pointer instead of returning 0, crashing instead of letting probe defer. Capture the clock in the existing 'clk' local and check it with IS_ERR() before calling clk_get_rate(), matching the handling already used for the "rtc" clock in this same function.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.1.191, 6.12.113, 6.18.56, 6.6.160, 7.2.10
- CVEs
- CVE-2026-98825
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 02:24 UTC · Revision 1
Source evidence
rtc: mpfs: fix unchecked devm_clk_get() error pointer in probe()
core-osv · Original sourcePublished 18 Oct 2026, 15:49 UTC
In the Linux kernel, the following vulnerability has been resolved: rtc: mpfs: fix unchecked devm_clk_get() error pointer in probe() devm_clk_get(&pdev->dev, "rtcref")'s return value was passed straight into clk_get_rate() without checking it for an error first, unlike the "rtc" clock a few lines above which is correctly checked with IS_ERR(). clk_get_rate() only guards against a NULL clk, not an error pointer: if (!clk) return 0; ... rate = clk_core_get_rate_recalc(clk->core); so if devm_clk_get() ever returns an error pointer here (for example ERR_PTR(-EPROBE_DEFER), which is the normal, expected outcome if the clkcfg clock-provider this RTC depends on has not registered its clocks yet by the time this driver probes), clk_get_rate() dereferences that error pointer instead of returning 0, crashing instead of letting probe defer. Capture the clock in the existing 'clk' local and check it with IS_ERR() before calling clk_get_rate(), matching the handling already used for the "rtc" clock in this same function.
osv:CVE-2026-98825
Kernel
Fixed versions: 6.1.191, 6.6.160, 6.12.113, 6.18.56, 7.2.10
Complete source record
{
"id": "fb0c095f18e35ab1fa97a9cc098afe6c3bd74a983969147328ffdade399036db",
"url": "https://osv.dev/vulnerability/CVE-2026-98825",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "rtc: mpfs: fix unchecked devm_clk_get() error pointer in probe()",
"summary": "In the Linux kernel, the following vulnerability has been resolved: rtc: mpfs: fix unchecked devm_clk_get() error pointer in probe() devm_clk_get(&pdev->dev, \"rtcref\")'s return value was passed straight into clk_get_rate() without checking it for an error first, unlike the \"rtc\" clock a few lines above which is correctly checked with IS_ERR(). clk_get_rate() only guards against a NULL clk, not an error pointer: if (!clk) return 0; ... rate = clk_core_get_rate_recalc(clk->core); so if devm_clk_get() ever returns an error pointer here (for example ERR_PTR(-EPROBE_DEFER), which is the normal, expected outcome if the clkcfg clock-provider this RTC depends on has not registered its clocks yet by the time this driver probes), clk_get_rate() dereferences that error pointer instead of returning 0, crashing instead of letting probe defer. Capture the clock in the existing 'clk' local and check it with IS_ERR() before calling clk_get_rate(), matching the handling already used for the \"rtc\" clock in this same function.",
"evidence": "osv:CVE-2026-98825",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.1.191",
"evidence": "/affected/1/ranges"
},
{
"value": "6.6.160",
"evidence": "/affected/1/ranges"
},
{
"value": "6.12.113",
"evidence": "/affected/1/ranges"
},
{
"value": "6.18.56",
"evidence": "/affected/1/ranges"
},
{
"value": "7.2.10",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2026-98825",
"aliases": [
"CVE-2026-98825"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "0b31d703598dc1993867597bbd45e87d824fc427"
},
{
"fixed": "7f59e824a4403e156cf930fe556b75139452099e"
},
{
"fixed": "ab741d1b714b4acc605f3d14cdc4120f87341ed1"
},
{
"fixed": "74dc7c52946e3d47c40edd0875adb7cc15937066"
},
{
"fixed": "cfd70c9b19846c524f2b6195a7484bdf22071ccf"
},
{
"fixed": "8a03f8422fa08eed335c51bccb612a3d81739ff2"
},
{
"fixed": "ac41b05d15db3134e839148290d67415ee0bdb58"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98825.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.0.0"
},
{
"fixed": "6.1.191"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.2.0"
},
{
"fixed": "6.6.160"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.7.0"
},
{
"fixed": "6.12.113"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.18.56"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.19.0"
},
{
"fixed": "7.2.10"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98825.json"
}
}
],
"modified": "2026-11-01T02:30:36.067735744Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/74dc7c52946e3d47c40edd0875adb7cc15937066",
"https://git.kernel.org/stable/c/7f59e824a4403e156cf930fe556b75139452099e",
"https://git.kernel.org/stable/c/8a03f8422fa08eed335c51bccb612a3d81739ff2",
"https://git.kernel.org/stable/c/ab741d1b714b4acc605f3d14cdc4120f87341ed1",
"https://git.kernel.org/stable/c/ac41b05d15db3134e839148290d67415ee0bdb58",
"https://git.kernel.org/stable/c/cfd70c9b19846c524f2b6195a7484bdf22071ccf",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98825.json",
"https://nvd.nist.gov/vuln/detail/CVE-2026-98825",
"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/98xxx/CVE-2026-98825.json"
}
},
"related_cves": [
{
"value": "CVE-2026-98825",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 499644,
"published_at": "2026-10-18T15:49:17.605+00:00"
}