{"id":"CVE-2025-38008","aliases":["CVE-2025-38008"],"related":[],"kind":"vulnerability","state":"published","title":"mm/page_alloc: fix race condition in unaccepted memory handling","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/page_alloc: fix race condition in unaccepted memory handling\n\nThe page allocator tracks the number of zones that have unaccepted memory\nusing static_branch_enc/dec() and uses that static branch in hot paths to\ndetermine if it needs to deal with unaccepted memory.\n\nBorislav and Thomas pointed out that the tracking is racy: operations on\nstatic_branch are not serialized against adding/removing unaccepted pages\nto/from the zone.\n\nSanity checks inside static_branch machinery detects it:\n\nWARNING: CPU: 0 PID: 10 at kernel/jump_label.c:276 __static_key_slow_dec_cpuslocked+0x8e/0xa0\n\nThe comment around the WARN() explains the problem:\n\n\t/*\n\t * Warn about the '-1' case though; since that means a\n\t * decrement is concurrent with a first (0->1) increment. IOW\n\t * people are trying to disable something that wasn't yet fully\n\t * enabled. This suggests an ordering problem on the user side.\n\t */\n\nThe effect of this static_branch optimization is only visible on\nmicrobenchmark.\n\nInstead of adding more complexity around it, remove it altogether.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/page_alloc: fix race condition in unaccepted memory handling\n\nThe page allocator tracks the number of zones that have unaccepted memory\nusing static_branch_enc/dec() and uses that static branch in hot paths to\ndetermine if it needs to deal with unaccepted memory.\n\nBorislav and Thomas pointed out that the tracking is racy: operations on\nstatic_branch are not serialized against adding/removing unaccepted pages\nto/from the zone.\n\nSanity checks inside static_branch machinery detects it:\n\nWARNING: CPU: 0 PID: 10 at kernel/jump_label.c:276 __static_key_slow_dec_cpuslocked+0x8e/0xa0\n\nThe comment around the WARN() explains the problem:\n\n\t/*\n\t * Warn about the '-1' case though; since that means a\n\t * decrement is concurrent with a first (0->1) increment. IOW\n\t * people are trying to disable something that wasn't yet fully\n\t * enabled. This suggests an ordering problem on the user side.\n\t */\n\nThe effect of this static_branch optimization is only visible on\nmicrobenchmark.\n\nInstead of adding more complexity around it, remove it altogether.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: mm/page_alloc: arregla la condición de ejecución en el manejo de memoria no aceptada El asignador de páginas rastrea el número de zonas que tienen memoria no aceptada usando static_branch_enc/dec() y usa esa rama estática en rutas activas para determinar si necesita lidiar con memoria no aceptada. Borislav y Thomas señalaron que el rastreo es acelerado: las operaciones en static_branch no se serializan contra la adición/eliminación de páginas no aceptadas a/desde la zona. Las comprobaciones de cordura dentro de la maquinaria static_branch lo detectan: ADVERTENCIA: CPU: 0 PID: 10 en kernel/jump_label.c:276 __static_key_slow_dec_cpuslocked+0x8e/0xa0 El comentario alrededor de WARN() explica el problema: /* * Sin embargo, advierte sobre el caso '-1'; ya que eso significa que un * decremento es concurrente con un primer incremento (0-&gt;1). Es decir, * se está intentando deshabilitar algo que aún no estaba completamente habilitado. Esto sugiere un problema de ordenamiento del usuario. */ El efecto de esta optimización de static_branch solo es visible en microbenchmark. En lugar de añadir más complejidad, elimínenla por completo.","source":"nvd"}],"published":"2025-06-18T09:28:19.358Z","modified":"2026-06-17T09:15:52.390Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","score":4.7,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","score":4.7,"rating":"MEDIUM"}],"cwes":["CWE-362"],"affected":[{"ranges":[{"type":"git","introduced":"dcdfdd40fa82b6704d2841938e5c8ec3051eb0d6","fixed":"98fdd2f612e949c652693f6df00442c81037776d","status":"affected"},{"type":"git","introduced":"dcdfdd40fa82b6704d2841938e5c8ec3051eb0d6","fixed":"74953f93f47a45296cc2a3fd04e2a3202ff3fa53","status":"affected"},{"type":"git","introduced":"dcdfdd40fa82b6704d2841938e5c8ec3051eb0d6","fixed":"71dda1cb10702dc2859f00eb789b0502de2176a9","status":"affected"},{"type":"git","introduced":"dcdfdd40fa82b6704d2841938e5c8ec3051eb0d6","fixed":"fefc075182275057ce607effaa3daa9e6e3bdc73","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.5","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.5","status":"unaffected"},{"type":"semver","introduced":"6.6.92","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.30","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.14.8","lastAffected":"6.14.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.15","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.5","fixed":"6.6.92"},{"status":"affected","introduced":"6.7","fixed":"6.12.30"},{"status":"affected","introduced":"6.13","fixed":"6.14.8"},{"status":"affected","version":"6.15"},{"status":"affected","version":"6.15"},{"status":"affected","version":"6.15"},{"status":"affected","version":"6.15"},{"status":"affected","version":"6.15"},{"status":"affected","version":"6.15"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/98fdd2f612e949c652693f6df00442c81037776d","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/74953f93f47a45296cc2a3fd04e2a3202ff3fa53","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/71dda1cb10702dc2859f00eb789b0502de2176a9","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/fefc075182275057ce607effaa3daa9e6e3bdc73","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-38008","url":"https://www.cve.org/CVERecord?id=CVE-2025-38008","licence":"CVE Terms of Use","modified":"2026-05-11T21:19:31.804Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-38008","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38008","licence":"Public domain","modified":"2026-06-17T09:15:52.390Z"}],"updatedAt":"2026-11-25T22:58:59.335Z","epss":{"score":0.00187,"percentile":0.04797,"date":"2026-11-30T12:00:22.000Z"}}