{"api_version":"1","generated_at":"2026-11-30T19:45:59+00:00","cve":"CVE-2026-139682","urls":{"html":"https://cve.report/CVE-2026-139682","api":"https://cve.report/api/cve/CVE-2026-139682.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-139682","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-139682"},"summary":{"title":"md/raid5: don't BUG() on an inconsistent reshape state from the superblock","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmd/raid5: don't BUG() on an inconsistent reshape state from the superblock\n\nraid5_run() branches on mddev->reshape_position. When it is MaxSector --\nno reshape in progress -- the else branch asserts that nothing else\ndescribes one:\n\n\tBUG_ON(mddev->level != mddev->new_level);\n\tBUG_ON(mddev->layout != mddev->new_layout);\n\tBUG_ON(mddev->chunk_sectors != mddev->new_chunk_sectors);\n\tBUG_ON(mddev->delta_disks != 0);\n\nNothing enforces that invariant. Both superblock validators copy the\nreshape fields straight off disk without cross-checking them against\neach other: super_1_validate() takes reshape_position, delta_disks,\nnew_level, new_layout and new_chunk from the superblock whenever\nMD_FEATURE_RESHAPE_ACTIVE is set, and super_90_validate() does the same\nfor minor version 91. A superblock that sets the reshape feature while\nleaving reshape_position at the MaxSector sentinel therefore reaches the\nelse branch with a non-zero delta_disks, and assembling the array takes\nthe machine down:\n\n  kernel BUG at drivers/md/raid5.c:8117!\n  Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI\n  RIP: 0010:raid5_run+0x11a7/0x1670 drivers/md/raid5.c:8117\n  Call Trace:\n   md_run+0xc2f/0x2510 drivers/md/md.c:6779\n   do_md_run+0x36/0x660 drivers/md/md.c:6880\n   array_state_store+0x9c5/0xcf0 drivers/md/md.c:4765\n   md_attr_store+0x1c5/0x330 drivers/md/md.c:6158\n   sysfs_kf_write+0xf2/0x150 fs/sysfs/file.c:145\n   kernfs_fop_write_iter+0x3e0/0x5f0 fs/kernfs/file.c:345\n\nThis is reachable by anyone who can present an md superblock, so BUG()\nis the wrong response. Refuse to start the array instead, the way the\nreshape_position != MaxSector branch a few lines above already refuses a\nreshape it cannot resume. Nothing has been allocated at this point --\nthe journal-and-bitmap check just above returns -EINVAL the same way --\nso there is nothing to unwind.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:19:56","updated_at":"2026-11-30 14:19:56"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/c093f0dd9119bee681facb5af2efbe476945666c","name":"https://git.kernel.org/stable/c/c093f0dd9119bee681facb5af2efbe476945666c","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/0669c7dbd1d375f279e607a24addc2f1dae2d4f3","name":"https://git.kernel.org/stable/c/0669c7dbd1d375f279e607a24addc2f1dae2d4f3","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/136a221544d919896a0f1bff8802eb51d0dff496","name":"https://git.kernel.org/stable/c/136a221544d919896a0f1bff8802eb51d0dff496","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/996c0df409b1cf2d4e9bb0dce0cb4ba0c1f50ed7","name":"https://git.kernel.org/stable/c/996c0df409b1cf2d4e9bb0dce0cb4ba0c1f50ed7","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/fa4122799a5bff6902848eafa00dc8e245ba261f","name":"https://git.kernel.org/stable/c/fa4122799a5bff6902848eafa00dc8e245ba261f","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/57926a227a2d610f586b99de2638a02b72e99762","name":"https://git.kernel.org/stable/c/57926a227a2d610f586b99de2638a02b72e99762","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/ef2a78ba818d0cd046c2f1614aebd200a26e01d6","name":"https://git.kernel.org/stable/c/ef2a78ba818d0cd046c2f1614aebd200a26e01d6","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/50485f1be262c2085443662b4a8be084fa958b9d","name":"https://git.kernel.org/stable/c/50485f1be262c2085443662b4a8be084fa958b9d","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-139682","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139682","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 91adb56473febeeb3ef657bb5147ddd355465700 996c0df409b1cf2d4e9bb0dce0cb4ba0c1f50ed7 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 91adb56473febeeb3ef657bb5147ddd355465700 c093f0dd9119bee681facb5af2efbe476945666c git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 91adb56473febeeb3ef657bb5147ddd355465700 ef2a78ba818d0cd046c2f1614aebd200a26e01d6 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 91adb56473febeeb3ef657bb5147ddd355465700 50485f1be262c2085443662b4a8be084fa958b9d git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 91adb56473febeeb3ef657bb5147ddd355465700 136a221544d919896a0f1bff8802eb51d0dff496 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 91adb56473febeeb3ef657bb5147ddd355465700 57926a227a2d610f586b99de2638a02b72e99762 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 91adb56473febeeb3ef657bb5147ddd355465700 fa4122799a5bff6902848eafa00dc8e245ba261f git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 91adb56473febeeb3ef657bb5147ddd355465700 0669c7dbd1d375f279e607a24addc2f1dae2d4f3 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2.6.30","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 2.6.30 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.10.275 5.10.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.15.226 5.15.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.193 6.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.163 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.119 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.65 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.6 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["drivers/md/raid5.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"996c0df409b1cf2d4e9bb0dce0cb4ba0c1f50ed7","status":"affected","version":"91adb56473febeeb3ef657bb5147ddd355465700","versionType":"git"},{"lessThan":"c093f0dd9119bee681facb5af2efbe476945666c","status":"affected","version":"91adb56473febeeb3ef657bb5147ddd355465700","versionType":"git"},{"lessThan":"ef2a78ba818d0cd046c2f1614aebd200a26e01d6","status":"affected","version":"91adb56473febeeb3ef657bb5147ddd355465700","versionType":"git"},{"lessThan":"50485f1be262c2085443662b4a8be084fa958b9d","status":"affected","version":"91adb56473febeeb3ef657bb5147ddd355465700","versionType":"git"},{"lessThan":"136a221544d919896a0f1bff8802eb51d0dff496","status":"affected","version":"91adb56473febeeb3ef657bb5147ddd355465700","versionType":"git"},{"lessThan":"57926a227a2d610f586b99de2638a02b72e99762","status":"affected","version":"91adb56473febeeb3ef657bb5147ddd355465700","versionType":"git"},{"lessThan":"fa4122799a5bff6902848eafa00dc8e245ba261f","status":"affected","version":"91adb56473febeeb3ef657bb5147ddd355465700","versionType":"git"},{"lessThan":"0669c7dbd1d375f279e607a24addc2f1dae2d4f3","status":"affected","version":"91adb56473febeeb3ef657bb5147ddd355465700","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["drivers/md/raid5.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"2.6.30"},{"lessThan":"2.6.30","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"5.10.*","status":"unaffected","version":"5.10.275","versionType":"semver"},{"lessThanOrEqual":"5.15.*","status":"unaffected","version":"5.15.226","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.193","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.163","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.119","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.65","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.6","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.10.275","versionStartIncluding":"2.6.30","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.15.226","versionStartIncluding":"2.6.30","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1.193","versionStartIncluding":"2.6.30","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.163","versionStartIncluding":"2.6.30","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.119","versionStartIncluding":"2.6.30","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.65","versionStartIncluding":"2.6.30","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.6","versionStartIncluding":"2.6.30","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"2.6.30","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmd/raid5: don't BUG() on an inconsistent reshape state from the superblock\n\nraid5_run() branches on mddev->reshape_position. When it is MaxSector --\nno reshape in progress -- the else branch asserts that nothing else\ndescribes one:\n\n\tBUG_ON(mddev->level != mddev->new_level);\n\tBUG_ON(mddev->layout != mddev->new_layout);\n\tBUG_ON(mddev->chunk_sectors != mddev->new_chunk_sectors);\n\tBUG_ON(mddev->delta_disks != 0);\n\nNothing enforces that invariant. Both superblock validators copy the\nreshape fields straight off disk without cross-checking them against\neach other: super_1_validate() takes reshape_position, delta_disks,\nnew_level, new_layout and new_chunk from the superblock whenever\nMD_FEATURE_RESHAPE_ACTIVE is set, and super_90_validate() does the same\nfor minor version 91. A superblock that sets the reshape feature while\nleaving reshape_position at the MaxSector sentinel therefore reaches the\nelse branch with a non-zero delta_disks, and assembling the array takes\nthe machine down:\n\n  kernel BUG at drivers/md/raid5.c:8117!\n  Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI\n  RIP: 0010:raid5_run+0x11a7/0x1670 drivers/md/raid5.c:8117\n  Call Trace:\n   md_run+0xc2f/0x2510 drivers/md/md.c:6779\n   do_md_run+0x36/0x660 drivers/md/md.c:6880\n   array_state_store+0x9c5/0xcf0 drivers/md/md.c:4765\n   md_attr_store+0x1c5/0x330 drivers/md/md.c:6158\n   sysfs_kf_write+0xf2/0x150 fs/sysfs/file.c:145\n   kernfs_fop_write_iter+0x3e0/0x5f0 fs/kernfs/file.c:345\n\nThis is reachable by anyone who can present an md superblock, so BUG()\nis the wrong response. Refuse to start the array instead, the way the\nreshape_position != MaxSector branch a few lines above already refuses a\nreshape it cannot resume. Nothing has been allocated at this point --\nthe journal-and-bitmap check just above returns -EINVAL the same way --\nso there is nothing to unwind."}],"providerMetadata":{"dateUpdated":"2026-11-30T13:37:00.369Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/996c0df409b1cf2d4e9bb0dce0cb4ba0c1f50ed7"},{"url":"https://git.kernel.org/stable/c/c093f0dd9119bee681facb5af2efbe476945666c"},{"url":"https://git.kernel.org/stable/c/ef2a78ba818d0cd046c2f1614aebd200a26e01d6"},{"url":"https://git.kernel.org/stable/c/50485f1be262c2085443662b4a8be084fa958b9d"},{"url":"https://git.kernel.org/stable/c/136a221544d919896a0f1bff8802eb51d0dff496"},{"url":"https://git.kernel.org/stable/c/57926a227a2d610f586b99de2638a02b72e99762"},{"url":"https://git.kernel.org/stable/c/fa4122799a5bff6902848eafa00dc8e245ba261f"},{"url":"https://git.kernel.org/stable/c/0669c7dbd1d375f279e607a24addc2f1dae2d4f3"}],"title":"md/raid5: don't BUG() on an inconsistent reshape state from the superblock","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-139682","datePublished":"2026-11-30T13:37:00.369Z","dateReserved":"2026-11-30T13:22:15.947Z","dateUpdated":"2026-11-30T13:37:00.369Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:19:56","lastModifiedDate":"2026-11-30 14:19:56","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"139682","Ordinal":"1","Title":"md/raid5: don't BUG() on an inconsistent reshape state from the ","CVE":"CVE-2026-139682","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"139682","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nmd/raid5: don't BUG() on an inconsistent reshape state from the superblock\n\nraid5_run() branches on mddev->reshape_position. When it is MaxSector --\nno reshape in progress -- the else branch asserts that nothing else\ndescribes one:\n\n\tBUG_ON(mddev->level != mddev->new_level);\n\tBUG_ON(mddev->layout != mddev->new_layout);\n\tBUG_ON(mddev->chunk_sectors != mddev->new_chunk_sectors);\n\tBUG_ON(mddev->delta_disks != 0);\n\nNothing enforces that invariant. Both superblock validators copy the\nreshape fields straight off disk without cross-checking them against\neach other: super_1_validate() takes reshape_position, delta_disks,\nnew_level, new_layout and new_chunk from the superblock whenever\nMD_FEATURE_RESHAPE_ACTIVE is set, and super_90_validate() does the same\nfor minor version 91. A superblock that sets the reshape feature while\nleaving reshape_position at the MaxSector sentinel therefore reaches the\nelse branch with a non-zero delta_disks, and assembling the array takes\nthe machine down:\n\n  kernel BUG at drivers/md/raid5.c:8117!\n  Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI\n  RIP: 0010:raid5_run+0x11a7/0x1670 drivers/md/raid5.c:8117\n  Call Trace:\n   md_run+0xc2f/0x2510 drivers/md/md.c:6779\n   do_md_run+0x36/0x660 drivers/md/md.c:6880\n   array_state_store+0x9c5/0xcf0 drivers/md/md.c:4765\n   md_attr_store+0x1c5/0x330 drivers/md/md.c:6158\n   sysfs_kf_write+0xf2/0x150 fs/sysfs/file.c:145\n   kernfs_fop_write_iter+0x3e0/0x5f0 fs/kernfs/file.c:345\n\nThis is reachable by anyone who can present an md superblock, so BUG()\nis the wrong response. Refuse to start the array instead, the way the\nreshape_position != MaxSector branch a few lines above already refuses a\nreshape it cannot resume. Nothing has been allocated at this point --\nthe journal-and-bitmap check just above returns -EINVAL the same way --\nso there is nothing to unwind.","Type":"Description","Title":"md/raid5: don't BUG() on an inconsistent reshape state from the "}]}}}