CVE-2026-98740: EDAC/altera: Drop __init from ECC setup paths for re-probe safety
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
EDAC/altera: Drop __init from ECC setup paths for re-probe safety
Sashiko reports:
"Does suppressing sysfs unbinding fully prevent the execution of freed __init memory? If altr_sysmgr_regmap_lookup_by_phandle() returns -EPROBE_DEFER, the probe is deferred until after __init memory is freed."
The a10 EDAC .setup callbacks (sdmmc, ethernet, nand, dma, usb, qspi) and their helpers (altr_init_a10_ecc_device_type, altr_init_a10_ecc_block) were marked __init. These run from the probe path, which may execute after init memory is freed -- e.g. a probe deferred via -EPROBE_DEFER that only succeeds once a late/module dependency appears, or a manual unbind/rebind. Calling __init code then dereferences freed memory. Remove __init so these functions remain valid at runtime.
The Linux kernel CVE team has assigned CVE-2026-98740 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.2 with commit 788586efd116d6d7d05985881eda503333e702b4 and fixed in 6.18.56 with commit 9846b85c2eb8b749c3f14bdcc31b1070f6aabba8 Issue introduced in 5.2 with commit 788586efd116d6d7d05985881eda503333e702b4 and fixed in 7.2.10 with commit 4ec26cb7984740941892ad21fa974963c198bfaa Issue introduced in 5.2 with commit 788586efd116d6d7d05985881eda503333e702b4 and fixed in 7.3-rc6 with commit b62a264163ca51bee04785c581344751812395df
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-98740
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/edac/altera_edac.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/9846b85c2eb8b749c3f14bdcc31b1070f6aabba8 https://git.kernel.org/stable/c/4ec26cb7984740941892ad21fa974963c198bfaa https://git.kernel.org/stable/c/b62a264163ca51bee04785c581344751812395df