From: Jean Delvare <jdelvare@suse.de>
To: stable@vger.kernel.org
Cc: "Borislav Petkov (AMD)" <bp@alien8.de>,
Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Subject: [PATCH stable] EDAC/mc: Really fix error path ordering in edac_mc_alloc()
Date: Tue, 3 Nov 2026 17:04:39 +0100 [thread overview]
Message-ID: <20261103170439.2f918d14@endymion> (raw)
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
next reply other threads:[~2026-11-03 16:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 16:04 Jean Delvare [this message]
2026-11-03 21:09 ` [PATCH stable] EDAC/mc: Really fix error path ordering in edac_mc_alloc() Borislav Petkov
2026-11-04 6:20 ` Jean Delvare
2026-11-04 15:03 ` Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261103170439.2f918d14@endymion \
--to=jdelvare@suse.de \
--cc=bp@alien8.de \
--cc=qiuxu.zhuo@intel.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox