Skip to contentSkip to conversation

CVE-2024-56708: EDAC/igen6: Avoid segmentation fault on module unload

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Dec 28, 2024

lore
Share & tools
lore
#0 lore raw

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

EDAC/igen6: Avoid segmentation fault on module unload

The segmentation fault happens because:

During modprobe:
1. In igen6_probe(), igen6_pvt will be allocated with kzalloc()
2. In igen6_register_mci(), mci->pvt_info will point to &igen6_pvt->imc[mc]

During rmmod:
1. In mci_release() in edac_mc.c, it will kfree(mci->pvt_info)
2. In igen6_remove(), it will kfree(igen6_pvt);

Fix this issue by setting mci->pvt_info to NULL to avoid the double kfree.

The Linux kernel CVE team has assigned CVE-2024-56708 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 5.11 with commit 10590a9d4f23e0a519730d79d39331df60ad2079 and fixed in 5.15.174 with commit 029ac07bb92d2f7502d47a4916f197a8445d83bf
	Issue introduced in 5.11 with commit 10590a9d4f23e0a519730d79d39331df60ad2079 and fixed in 6.1.120 with commit 2a80e710bbc088a2511c159ee4d910456c5f0832
	Issue introduced in 5.11 with commit 10590a9d4f23e0a519730d79d39331df60ad2079 and fixed in 6.6.64 with commit 830cabb61113d92a425dd3038ccedbdfb3c8d079
	Issue introduced in 5.11 with commit 10590a9d4f23e0a519730d79d39331df60ad2079 and fixed in 6.11.11 with commit e5c7052664b61f9e2f896702d20552707d0ef60a
	Issue introduced in 5.11 with commit 10590a9d4f23e0a519730d79d39331df60ad2079 and fixed in 6.12.2 with commit db60326f2c47b079e36785ace621eb3002db2088
	Issue introduced in 5.11 with commit 10590a9d4f23e0a519730d79d39331df60ad2079 and fixed in 6.13-rc1 with commit fefaae90398d38a1100ccd73b46ab55ff4610fba

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-2024-56708

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/igen6_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/029ac07bb92d2f7502d47a4916f197a8445d83bf
	https://git.kernel.org/stable/c/2a80e710bbc088a2511c159ee4d910456c5f0832
	https://git.kernel.org/stable/c/830cabb61113d92a425dd3038ccedbdfb3c8d079
	https://git.kernel.org/stable/c/e5c7052664b61f9e2f896702d20552707d0ef60a
	https://git.kernel.org/stable/c/db60326f2c47b079e36785ace621eb3002db2088
	https://git.kernel.org/stable/c/fefaae90398d38a1100ccd73b46ab55ff4610fba