{"id":"CVE-2026-31689","aliases":["CVE-2026-31689"],"related":[],"kind":"vulnerability","state":"published","title":"EDAC/mc: Fix error path ordering in edac_mc_alloc()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nEDAC/mc: Fix error path ordering in edac_mc_alloc()\n\nWhen the mci->pvt_info allocation in edac_mc_alloc() fails, the error path\nwill call put_device() which will end up calling the device's release\nfunction.\n\nHowever, the init ordering is wrong such that device_initialize() happens\n*after* the failed allocation and thus the device itself and the release\nfunction pointer are not initialized yet when they're called:\n\n  MCE: In-kernel MCE decoding enabled.\n  ------------[ cut here ]------------\n  kobject: '(null)': is not initialized, yet kobject_put() is being called.\n  WARNING: lib/kobject.c:734 at kobject_put, CPU#22: systemd-udevd\n  CPU: 22 UID: 0 PID: 538 Comm: systemd-udevd Not tainted 7.0.0-rc1+ #2 PREEMPT(full)\n  RIP: 0010:kobject_put\n  Call Trace:\n   <TASK>\n   edac_mc_alloc+0xbe/0xe0 [edac_core]\n   amd64_edac_init+0x7a4/0xff0 [amd64_edac]\n   ? __pfx_amd64_edac_init+0x10/0x10 [amd64_edac]\n   do_one_initcall\n   ...\n\nReorder the calling sequence so that the device is initialized and thus the\nrelease function pointer is properly set before it can be used.\n\nThis was found by Claude while reviewing another EDAC patch.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nEDAC/mc: Fix error path ordering in edac_mc_alloc()\n\nWhen the mci->pvt_info allocation in edac_mc_alloc() fails, the error path\nwill call put_device() which will end up calling the device's release\nfunction.\n\nHowever, the init ordering is wrong such that device_initialize() happens\n*after* the failed allocation and thus the device itself and the release\nfunction pointer are not initialized yet when they're called:\n\n  MCE: In-kernel MCE decoding enabled.\n  ------------[ cut here ]------------\n  kobject: '(null)': is not initialized, yet kobject_put() is being called.\n  WARNING: lib/kobject.c:734 at kobject_put, CPU#22: systemd-udevd\n  CPU: 22 UID: 0 PID: 538 Comm: systemd-udevd Not tainted 7.0.0-rc1+ #2 PREEMPT(full)\n  RIP: 0010:kobject_put\n  Call Trace:\n   <TASK>\n   edac_mc_alloc+0xbe/0xe0 [edac_core]\n   amd64_edac_init+0x7a4/0xff0 [amd64_edac]\n   ? __pfx_amd64_edac_init+0x10/0x10 [amd64_edac]\n   do_one_initcall\n   ...\n\nReorder the calling sequence so that the device is initialized and thus the\nrelease function pointer is properly set before it can be used.\n\nThis was found by Claude while reviewing another EDAC patch.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nEDAC/mc: Corregir el orden de la ruta de error en edac_mc_alloc()\n\nCuando la asignación de mci  ->  pvt_info en edac_mc_alloc() falla, la ruta de error llamará a put_device(), lo que terminará llamando a la función de liberación del dispositivo.\n\nSin embargo, el orden de inicialización es incorrecto, de tal manera que device_initialize() ocurre después de la asignación fallida y, por lo tanto, el dispositivo en sí y el puntero de la función de liberación no están inicializados aún cuando son llamados:\n\n  MCE: In-kernel MCE decoding enabled.\n  - - - - - - - - - - - -[ cut here ]- - - - - - - - - - - -\n  kobject: ’(null)’: is not initialized, yet kobject_put() is being called.\n  WARNING: lib/kobject.c:734 at kobject_put, CPU#22: systemd-udevd\n  CPU: 22 UID: 0 PID: 538 Comm: systemd-udevd Not tainted 7.0.0-rc1+ #2 PREEMPT(full)\n  RIP: 0010:kobject_put\n  Call Trace:\n   [TASK]\n   edac_mc_alloc+0xbe/0xe0 [edac_core]\n   amd64_edac_init+0x7a4/0xff0 [amd64_edac]\n   ? __pfx_amd64_edac_init+0x10/0x10 [amd64_edac]\n   do_one_initcall\n   ...\n\nReordenar la secuencia de llamadas para que el dispositivo sea inicializado y, por lo tanto, el puntero de la función de liberación esté correctamente establecido antes de que pueda ser utilizado.\n\nEsto fue encontrado por Claude mientras revisaba otro parche EDAC.","source":"nvd"}],"published":"2026-04-27T17:34:27.793Z","modified":"2026-11-11T23:10:00.263Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-476"],"affected":[{"ranges":[{"type":"git","introduced":"0bbb265f7089584aaa6d440805ca75ea4f3930d4","fixed":"aae95970fad2127a1bd49d8713c7cd0677dcd2d6","status":"affected"},{"type":"git","introduced":"0bbb265f7089584aaa6d440805ca75ea4f3930d4","fixed":"d3de72e2a2b9ee3a57734c1c068823e41a707715","status":"affected"},{"type":"git","introduced":"0bbb265f7089584aaa6d440805ca75ea4f3930d4","fixed":"d20e98c2df9354cc744431ad8ccbf49405b8b40f","status":"affected"},{"type":"git","introduced":"0bbb265f7089584aaa6d440805ca75ea4f3930d4","fixed":"87ce8ae511962e105bcb3534944208c6a9471ed9","status":"affected"},{"type":"git","introduced":"0bbb265f7089584aaa6d440805ca75ea4f3930d4","fixed":"75825648ce984ca4cebb28e4bd2bf8c3a7e837c5","status":"affected"},{"type":"git","introduced":"0bbb265f7089584aaa6d440805ca75ea4f3930d4","fixed":"51520e03e70d6c73e33ee7cbe0319767d05764fe","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.19","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.19","status":"unaffected"},{"type":"semver","introduced":"6.1.169","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.135","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.82","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.23","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"6.19.13","lastAffected":"6.19.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.0","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.19","fixed":"6.1.169"},{"status":"affected","introduced":"6.2","fixed":"6.6.135"},{"status":"affected","introduced":"6.7","fixed":"6.12.82"},{"status":"affected","introduced":"6.13","fixed":"6.18.23"},{"status":"affected","introduced":"6.19","fixed":"6.19.13"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/aae95970fad2127a1bd49d8713c7cd0677dcd2d6","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d3de72e2a2b9ee3a57734c1c068823e41a707715","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d20e98c2df9354cc744431ad8ccbf49405b8b40f","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/87ce8ae511962e105bcb3534944208c6a9471ed9","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/75825648ce984ca4cebb28e4bd2bf8c3a7e837c5","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/51520e03e70d6c73e33ee7cbe0319767d05764fe","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-31689","url":"https://www.cve.org/CVERecord?id=CVE-2026-31689","licence":"CVE Terms of Use","modified":"2026-05-11T22:13:44.271Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-31689","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31689","licence":"Public domain","modified":"2026-11-11T23:10:00.263Z"}],"updatedAt":"2026-11-25T22:59:19.687Z","epss":{"score":0.00119,"percentile":0.0194,"date":"2026-12-01T12:00:22.000Z"}}