Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH stable] EDAC/mc: Really fix error path ordering in edac_mc_alloc()
@ 2026-11-03 16:04 Jean Delvare
  2026-11-03 21:09 ` Borislav Petkov
  2026-11-04 15:03 ` Sasha Levin
  0 siblings, 2 replies; 4+ messages in thread
From: Jean Delvare @ 2026-11-03 16:04 UTC (permalink / raw)
  To: stable; +Cc: Borislav Petkov (AMD), Qiuxu Zhuo

The backport of 51520e03e70d ("EDAC/mc: Fix error path ordering in
edac_mc_alloc()") to stable kernel branches is incomplete due to a
different memory allocation scheme. In v6.19 and earlier, the device
initialization must be moved further up so that all jumps to the
error label are covered.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: stable@kernel.org # v6.19-
---
I believe that CVE-2026-31689 is not properly fixed in kernels v6.19 and
older as of today, and the patch below shall address that. Affected
branches still under maintenance would be v6.18, v6.12, v6.6 and v6.1.
v6.19 is equally affected but no longer maintained.

I wrote to Borislav earlier about this but I'm unsure if my message
reached him as I did not hear back. So I'm sending it to the stable
kernel list this time.

 drivers/edac/edac_mc.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- linux-6.18.orig/drivers/edac/edac_mc.c
+++ linux-6.18/drivers/edac/edac_mc.c
@@ -366,13 +366,13 @@ struct mem_ctl_info *edac_mc_alloc(unsig
 	if (!mci)
 		return NULL;
 
+	mci->dev.release = mci_release;
+	device_initialize(&mci->dev);
+
 	mci->layers = kcalloc(n_layers, sizeof(struct edac_mc_layer), GFP_KERNEL);
 	if (!mci->layers)
 		goto error;
 
-	mci->dev.release = mci_release;
-	device_initialize(&mci->dev);
-
 	mci->pvt_info = kzalloc(sz_pvt, GFP_KERNEL);
 	if (!mci->pvt_info)
 		goto error;


-- 
Jean Delvare
SUSE L3 Support

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-04 15:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-03 16:04 [PATCH stable] EDAC/mc: Really fix error path ordering in edac_mc_alloc() Jean Delvare
2026-11-03 21:09 ` Borislav Petkov
2026-11-04  6:20   ` Jean Delvare
2026-11-04 15:03 ` Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox