{"id":"CVE-2022-49549","aliases":["CVE-2022-49549"],"related":[],"kind":"vulnerability","state":"published","title":"x86/MCE/AMD: Fix memory leak when threshold_create_bank() fails","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nx86/MCE/AMD: Fix memory leak when threshold_create_bank() fails\n\nIn mce_threshold_create_device(), if threshold_create_bank() fails, the\npreviously allocated threshold banks array @bp will be leaked because\nthe call to mce_threshold_remove_device() will not free it.\n\nThis happens because mce_threshold_remove_device() fetches the pointer\nthrough the threshold_banks per-CPU variable but bp is written there\nonly after the bank creation is successful, and not before, when\nthreshold_create_bank() fails.\n\nAdd a helper which unwinds all the bank creation work previously done\nand pass into it the previously allocated threshold banks array for\nfreeing.\n\n  [ bp: Massage. ]","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nx86/MCE/AMD: Fix memory leak when threshold_create_bank() fails\n\nIn mce_threshold_create_device(), if threshold_create_bank() fails, the\npreviously allocated threshold banks array @bp will be leaked because\nthe call to mce_threshold_remove_device() will not free it.\n\nThis happens because mce_threshold_remove_device() fetches the pointer\nthrough the threshold_banks per-CPU variable but bp is written there\nonly after the bank creation is successful, and not before, when\nthreshold_create_bank() fails.\n\nAdd a helper which unwinds all the bank creation work previously done\nand pass into it the previously allocated threshold banks array for\nfreeing.\n\n  [ bp: Massage. ]","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: x86/MCE/AMD: Se corrige la pérdida de memoria cuando falla el umbral_create_bank() En mce_threshold_create_device(), si falla el umbral_create_bank(), la matriz de bancos de umbral previamente asignada @bp se filtrará porque la llamada a mce_threshold_remove_device() no la liberará. Esto sucede porque mce_threshold_remove_device() obtiene el puntero a través de la variable por CPU del umbral_banks, pero bp se escribe allí solo después de que la creación del banco sea exitosa, y no antes, cuando falla el umbral_create_bank(). Agregue un asistente que desenrolle todo el trabajo de creación de bancos previamente realizado y le pase la matriz de bancos de umbral previamente asignada para liberar. [ bp: Masaje. ]","source":"nvd"}],"published":"2025-02-26T02:14:00.256Z","modified":"2026-06-17T05:18:25.043Z","severity":{"scorer":"CISA-ADP","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":"CISA-ADP","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"},{"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-401"],"affected":[{"ranges":[{"type":"git","introduced":"6458de97fc15530b54477c4e2b70af653e8ac3d9","fixed":"b4acb8e7f1594607bc9017ef0aacb40b24a003d6","status":"affected"},{"type":"git","introduced":"6458de97fc15530b54477c4e2b70af653e8ac3d9","fixed":"cc0dd4456f9573bf8af9b4d8754433918e809e1e","status":"affected"},{"type":"git","introduced":"6458de97fc15530b54477c4e2b70af653e8ac3d9","fixed":"9708f1956eeb70c86943e0bc62fa3b0101b59616","status":"affected"},{"type":"git","introduced":"6458de97fc15530b54477c4e2b70af653e8ac3d9","fixed":"396b8e7ab2a99ddac57d3522b3da5e58cb608d37","status":"affected"},{"type":"git","introduced":"6458de97fc15530b54477c4e2b70af653e8ac3d9","fixed":"e5f28623ceb103e13fc3d7bd45edf9818b227fd0","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.8","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.8","status":"unaffected"},{"type":"semver","introduced":"5.10.121","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.46","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"5.17.14","lastAffected":"5.17.*","status":"unaffected"},{"type":"semver","introduced":"5.18.3","lastAffected":"5.18.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.19","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.8","fixed":"5.10.121"},{"status":"affected","introduced":"5.11","fixed":"5.15.46"},{"status":"affected","introduced":"5.16","fixed":"5.17.14"},{"status":"affected","introduced":"5.18","fixed":"5.18.3"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/b4acb8e7f1594607bc9017ef0aacb40b24a003d6","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/cc0dd4456f9573bf8af9b4d8754433918e809e1e","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9708f1956eeb70c86943e0bc62fa3b0101b59616","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/396b8e7ab2a99ddac57d3522b3da5e58cb608d37","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e5f28623ceb103e13fc3d7bd45edf9818b227fd0","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-10-01T19:37:22.894Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-49549","url":"https://www.cve.org/CVERecord?id=CVE-2022-49549","licence":"CVE Terms of Use","modified":"2026-05-11T19:02:05.848Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-49549","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49549","licence":"Public domain","modified":"2026-06-17T05:18:25.043Z"}],"updatedAt":"2026-11-25T22:58:20.724Z","epss":{"score":0.00268,"percentile":0.20283,"date":"2026-12-01T12:00:22.000Z"}}