{"id":"CVE-2026-139006","aliases":["CVE-2026-139006"],"related":[],"kind":"vulnerability","state":"published","title":"md/raid5: track disks array size to fix extra_page leak on error paths","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nmd/raid5: track disks array size to fix extra_page leak on error paths\n\nfree_conf() iterates conf->pool_size entries to free extra_page\nallocations, but pool_size may not reflect the actual size of the\nconf->disks array.  Two scenarios cause a mismatch:\n\n1. setup_conf() early abort: pool_size is 0 (not yet set by\n   grow_stripes) but conf->disks has max_disks entries with\n   extra_page allocated.  The loop iterates 0 times, leaking all\n   pages.\n\n2. resize_stripes() Step 4 failure: conf->disks was replaced with\n   a newsize-entry array in Step 3, but pool_size is only updated\n   on success.  The loop iterates pool_size (old, smaller value)\n   times, leaking (newsize - pool_size) pages.\n\nAdd a dedicated disks_cnt field to track the actual number of\nentries in conf->disks.  Set it immediately after each allocation\nor replacement (in setup_conf and resize_stripes Step 3, where the\narray is safely stalled with no concurrent access), and use it in\nfree_conf() instead of pool_size.\n\nThis leaves pool_size untouched, preserving the check_reshape()\nretry behavior that depends on pool_size only being updated on\nfull success.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nmd/raid5: track disks array size to fix extra_page leak on error paths\n\nfree_conf() iterates conf->pool_size entries to free extra_page\nallocations, but pool_size may not reflect the actual size of the\nconf->disks array.  Two scenarios cause a mismatch:\n\n1. setup_conf() early abort: pool_size is 0 (not yet set by\n   grow_stripes) but conf->disks has max_disks entries with\n   extra_page allocated.  The loop iterates 0 times, leaking all\n   pages.\n\n2. resize_stripes() Step 4 failure: conf->disks was replaced with\n   a newsize-entry array in Step 3, but pool_size is only updated\n   on success.  The loop iterates pool_size (old, smaller value)\n   times, leaking (newsize - pool_size) pages.\n\nAdd a dedicated disks_cnt field to track the actual number of\nentries in conf->disks.  Set it immediately after each allocation\nor replacement (in setup_conf and resize_stripes Step 3, where the\narray is safely stalled with no concurrent access), and use it in\nfree_conf() instead of pool_size.\n\nThis leaves pool_size untouched, preserving the check_reshape()\nretry behavior that depends on pool_size only being updated on\nfull success.","source":"cvelist"}],"published":"2026-11-30T13:27:00.077Z","modified":"2026-11-30T14:18:03.670Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"d7bd398e97f236a2353689eca5e8950f67cd34d5","fixed":"e88c6ccee75ccb1334df0648843e2bc500ce90d0","status":"affected"},{"type":"git","introduced":"d7bd398e97f236a2353689eca5e8950f67cd34d5","fixed":"8e1fa4e1e542ea25cf14e1d7a18b438c51eac6d6","status":"affected"},{"type":"git","introduced":"d7bd398e97f236a2353689eca5e8950f67cd34d5","fixed":"006ff293b34060e15ddfa50cbb2778a2446116ab","status":"affected"},{"type":"git","introduced":"d7bd398e97f236a2353689eca5e8950f67cd34d5","fixed":"6a5408c6be7c3867221e0c692fc0c4f065c14f38","status":"affected"},{"type":"git","introduced":"d7bd398e97f236a2353689eca5e8950f67cd34d5","fixed":"fa1f5f15514c52936e12c77c6f719af6ec51a152","status":"affected"},{"type":"git","introduced":"d7bd398e97f236a2353689eca5e8950f67cd34d5","fixed":"e4e9104f9ce463b6876144bae6d1e4484ceb3325","status":"affected"},{"type":"git","introduced":"d7bd398e97f236a2353689eca5e8950f67cd34d5","fixed":"a0401d7e0aa3f36501a868ec8b1e6bcfaa7dcd35","status":"affected"},{"type":"git","introduced":"d7bd398e97f236a2353689eca5e8950f67cd34d5","fixed":"5028ceee173bfcf844469cfb0d1c151d3f6d0296","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.10","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.10","status":"unaffected"},{"type":"semver","introduced":"5.10.275","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.226","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.193","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.163","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.117","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.63","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.4","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/e88c6ccee75ccb1334df0648843e2bc500ce90d0","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8e1fa4e1e542ea25cf14e1d7a18b438c51eac6d6","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/006ff293b34060e15ddfa50cbb2778a2446116ab","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6a5408c6be7c3867221e0c692fc0c4f065c14f38","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/fa1f5f15514c52936e12c77c6f719af6ec51a152","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e4e9104f9ce463b6876144bae6d1e4484ceb3325","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a0401d7e0aa3f36501a868ec8b1e6bcfaa7dcd35","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5028ceee173bfcf844469cfb0d1c151d3f6d0296","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-139006","url":"https://www.cve.org/CVERecord?id=CVE-2026-139006","licence":"CVE Terms of Use","modified":"2026-11-30T13:27:00.077Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-139006","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139006","licence":"Public domain","modified":"2026-11-30T14:18:03.670Z"}],"updatedAt":"2026-11-30T14:32:22.103Z","epss":{"score":0.00211,"percentile":0.12011,"date":"2026-12-01T12:00:22.000Z"}}