{"id":"CVE-2025-39727","aliases":["CVE-2025-39727"],"related":[],"kind":"vulnerability","state":"published","title":"mm: swap: fix potential buffer overflow in setup_clusters()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm: swap: fix potential buffer overflow in setup_clusters()\n\nIn setup_swap_map(), we only ensure badpages are in range (0, last_page]. \nAs maxpages might be < last_page, setup_clusters() will encounter a buffer\noverflow when a badpage is >= maxpages.\n\nOnly call inc_cluster_info_page() for badpage which is < maxpages to fix\nthe issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm: swap: fix potential buffer overflow in setup_clusters()\n\nIn setup_swap_map(), we only ensure badpages are in range (0, last_page]. \nAs maxpages might be < last_page, setup_clusters() will encounter a buffer\noverflow when a badpage is >= maxpages.\n\nOnly call inc_cluster_info_page() for badpage which is < maxpages to fix\nthe issue.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad:\n\nmm: swap: solucionar un posible desbordamiento de búfer en setup_clusters()\n\nEn setup_swap_map(), solo nos aseguramos de que las badpages estén en el rango (0, last_page]. Como maxpages podría ser < last_page, setup_clusters() encontrará un desbordamiento de búfer cuando una badpage sea >= maxpages.\n\nSolo llamar a inc_cluster_info_page() para badpage que sea < maxpages para solucionar el problema.","source":"nvd"}],"published":"2025-09-07T15:16:17.986Z","modified":"2026-10-19T21:10:00.160Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-120"],"affected":[{"ranges":[{"type":"git","introduced":"b843786b0bd01ced7fcdbf3b033d68db2f7c61b2","fixed":"91b370800b3f2b3dda244c0ab06719c4971190a5","status":"affected"},{"type":"git","introduced":"b843786b0bd01ced7fcdbf3b033d68db2f7c61b2","fixed":"9b01ada580ee84fb319e7ecb5fb5b1f54a9eb799","status":"affected"},{"type":"git","introduced":"b843786b0bd01ced7fcdbf3b033d68db2f7c61b2","fixed":"815c528b13f2bb9b3130c13bedeabf2351a68129","status":"affected"},{"type":"git","introduced":"b843786b0bd01ced7fcdbf3b033d68db2f7c61b2","fixed":"152c1339dc13ad46f1b136e8693de15980750835","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.12","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.12","status":"unaffected"},{"type":"semver","introduced":"6.12.42","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.15.10","lastAffected":"6.15.*","status":"unaffected"},{"type":"semver","introduced":"6.16.1","lastAffected":"6.16.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.17","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":"6.12","fixed":"6.12.42"},{"status":"affected","introduced":"6.13","fixed":"6.15.10"},{"status":"affected","introduced":"6.16","fixed":"6.16.1"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/91b370800b3f2b3dda244c0ab06719c4971190a5","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9b01ada580ee84fb319e7ecb5fb5b1f54a9eb799","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/815c528b13f2bb9b3130c13bedeabf2351a68129","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/152c1339dc13ad46f1b136e8693de15980750835","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-39727","url":"https://www.cve.org/CVERecord?id=CVE-2025-39727","licence":"CVE Terms of Use","modified":"2026-05-11T21:35:06.160Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-39727","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-39727","licence":"Public domain","modified":"2026-10-19T21:10:00.160Z"}],"updatedAt":"2026-11-25T22:59:04.313Z","epss":{"score":0.00193,"percentile":0.09432,"date":"2026-12-01T12:00:22.000Z"}}