CVE-2026-139682
md/raid5: don't BUG() on an inconsistent reshape state from the superblock
AI summary AI generated
An attacker who can present a crafted md RAID superblock can crash the Linux kernel during array assembly by triggering a BUG() on inconsistent reshape state.
Mitigation
- Upgrade Linux to 0669c7dbd1d375f279e607a24addc2f1dae2d4f3 or later.
Who should check
- Anyone running Linux >= 91adb56473febeeb3ef657bb5147ddd355465700, < 996c0df409b1cf2d4e9bb0dce0cb4ba0c1f50ed7; >= 91adb56473febeeb3ef657bb5147ddd355465700, < c093f0dd9119bee681facb5af2efbe476945666c; >= 91adb56473febeeb3ef657bb5147ddd355465700, < ef2a78ba818d0cd046c2f1614aebd200a26e01d6; >= 91adb56473febeeb3ef657bb5147ddd355465700, < 50485f1be262c2085443662b4a8be084fa958b9d; >= 91adb56473febeeb3ef657bb5147ddd355465700, < 136a221544d919896a0f1bff8802eb51d0dff496; >= 91adb56473febeeb3ef657bb5147ddd355465700, < 57926a227a2d610f586b99de2638a02b72e99762; >= 91adb56473febeeb3ef657bb5147ddd355465700, < fa4122799a5bff6902848eafa00dc8e245ba261f; >= 91adb56473febeeb3ef657bb5147ddd355465700, < 0669c7dbd1d375f279e607a24addc2f1dae2d4f3
- Anyone running Linux 2.6.30
Vulnerability facts
- Affected
- Linux >= 91adb56473febeeb3ef657bb5147ddd355465700, < 996c0df409b1cf2d4e9bb0dce0cb4ba0c1f50ed7; >= 91adb56473febeeb3ef657bb5147ddd355465700, < c093f0dd9119bee681facb5af2efbe476945666c; >= 91adb56473febeeb3ef657bb5147ddd355465700, < ef2a78ba818d0cd046c2f1614aebd200a26e01d6; >= 91adb56473febeeb3ef657bb5147ddd355465700, < 50485f1be262c2085443662b4a8be084fa958b9d; >= 91adb56473febeeb3ef657bb5147ddd355465700, < 136a221544d919896a0f1bff8802eb51d0dff496; >= 91adb56473febeeb3ef657bb5147ddd355465700, < 57926a227a2d610f586b99de2638a02b72e99762; >= 91adb56473febeeb3ef657bb5147ddd355465700, < fa4122799a5bff6902848eafa00dc8e245ba261f; >= 91adb56473febeeb3ef657bb5147ddd355465700, < 0669c7dbd1d375f279e607a24addc2f1dae2d4f3; Linux 2.6.30
- Fixed in
- Linux 996c0df409b1cf2d4e9bb0dce0cb4ba0c1f50ed7, Linux 50485f1be262c2085443662b4a8be084fa958b9d, Linux 136a221544d919896a0f1bff8802eb51d0dff496, Linux 57926a227a2d610f586b99de2638a02b72e99762, Linux 0669c7dbd1d375f279e607a24addc2f1dae2d4f3
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Unknown
- CVSS
- Not scored yet
- Modified
Description
In the Linux kernel, the following vulnerability has been resolved: md/raid5: don't BUG() on an inconsistent reshape state from the superblock raid5_run() branches on mddev->reshape_position. When it is MaxSector -- no reshape in progress -- the else branch asserts that nothing else describes one: BUG_ON(mddev->level != mddev->new_level); BUG_ON(mddev->layout != mddev->new_layout); BUG_ON(mddev->chunk_sectors != mddev->new_chunk_sectors); BUG_ON(mddev->delta_disks != 0); Nothing enforces that invariant. Both superblock validators copy the reshape fields straight off disk without cross-checking them against each other: super_1_validate() takes reshape_position, delta_disks, new_level, new_layout and new_chunk from the superblock whenever MD_FEATURE_RESHAPE_ACTIVE is set, and super_90_validate() does the same for minor version 91. A superblock that sets the reshape feature while leaving reshape_position at the MaxSector sentinel therefore reaches the else branch with a non-zero delta_disks, and assembling the array takes the machine down: kernel BUG at drivers/md/raid5.c:8117! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI RIP: 0010:raid5_run+0x11a7/0x1670 drivers/md/raid5.c:8117 Call Trace: md_run+0xc2f/0x2510 drivers/md/md.c:6779 do_md_run+0x36/0x660 drivers/md/md.c:6880 array_state_store+0x9c5/0xcf0 drivers/md/md.c:4765 md_attr_store+0x1c5/0x330 drivers/md/md.c:6158 sysfs_kf_write+0xf2/0x150 fs/sysfs/file.c:145 kernfs_fop_write_iter+0x3e0/0x5f0 fs/kernfs/file.c:345 This is reachable by anyone who can present an md superblock, so BUG() is the wrong response. Refuse to start the array instead, the way the reshape_position != MaxSector branch a few lines above already refuses a reshape it cannot resume. Nothing has been allocated at this point -- the journal-and-bitmap check just above returns -EINVAL the same way -- so there is nothing to unwind.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= 91adb56473febeeb3ef657bb5147ddd355465700, < 996c0df409b1cf2d4e9bb0dce0cb4ba0c1f50ed7; >= 91adb56473febeeb3ef657bb5147ddd355465700, < c093f0dd9119bee681facb5af2efbe476945666c; >= 91adb56473febeeb3ef657bb5147ddd355465700, < ef2a78ba818d0cd046c2f1614aebd200a26e01d6; >= 91adb56473febeeb3ef657bb5147ddd355465700, < 50485f1be262c2085443662b4a8be084fa958b9d; >= 91adb56473febeeb3ef657bb5147ddd355465700, < 136a221544d919896a0f1bff8802eb51d0dff496; >= 91adb56473febeeb3ef657bb5147ddd355465700, < 57926a227a2d610f586b99de2638a02b72e99762; >= 91adb56473febeeb3ef657bb5147ddd355465700, < fa4122799a5bff6902848eafa00dc8e245ba261f; >= 91adb56473febeeb3ef657bb5147ddd355465700, < 0669c7dbd1d375f279e607a24addc2f1dae2d4f3 | — | cvelist |
| Linux | 2.6.30 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-139682. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-139682.md Affected: Linux >= 91adb56473febeeb3ef657bb5147ddd355465700, < 996c0df409b1cf2d4e9bb0dce0cb4ba0c1f50ed7; >= 91adb56473febeeb3ef657bb5147ddd355465700, < c093f0dd9119bee681facb5af2efbe476945666c; >= 91adb56473febeeb3ef657bb5147ddd355465700, < ef2a78ba818d0cd046c2f1614aebd200a26e01d6; >= 91adb56473febeeb3ef657b… Fixed in: Linux 996c0df409b1cf2d4e9bb0dce0cb4ba0c1f50ed7, Linux 50485f1be262c2085443662b4a8be084fa958b9d, Linux 136a221544d919896a0f1bff8802eb51d0dff496, Linux 57926a227a2d610f586b99de2638a02b72e99762, Linux 0669c7dbd1d375f279e607a24addc2f1dae2d4f3 Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
Technologies
References
Other
- https://git.kernel.org/stable/c/996c0df409b1cf2d4e9bb0dce0cb4ba0c1f50ed7
- https://git.kernel.org/stable/c/c093f0dd9119bee681facb5af2efbe476945666c
- https://git.kernel.org/stable/c/ef2a78ba818d0cd046c2f1614aebd200a26e01d6
- https://git.kernel.org/stable/c/50485f1be262c2085443662b4a8be084fa958b9d
- https://git.kernel.org/stable/c/136a221544d919896a0f1bff8802eb51d0dff496
- https://git.kernel.org/stable/c/57926a227a2d610f586b99de2638a02b72e99762
- https://git.kernel.org/stable/c/fa4122799a5bff6902848eafa00dc8e245ba261f
- https://git.kernel.org/stable/c/0669c7dbd1d375f279e607a24addc2f1dae2d4f3
FAQ
Is CVE-2026-139682 being exploited?
There is no confirmed exploitation: CVE-2026-139682 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.
How serious is CVE-2026-139682?
It has no CVSS score yet. Unknown.
Which versions are affected by CVE-2026-139682?
Linux >= 91adb56473febeeb3ef657bb5147ddd355465700, < 996c0df409b1cf2d4e9bb0dce0cb4ba0c1f50ed7; >= 91adb56473febeeb3ef657bb5147ddd355465700, < c093f0dd9119bee681facb5af2efbe476945666c; >= 91adb56473febeeb3ef657bb5147ddd355465700, < ef2a78ba818d0cd046c2f1614aebd200a26e01d6; >= 91adb56473febeeb3ef657bb5147ddd355465700, < 50485f1be262c2085443662b4a8be084fa958b9d; >= 91adb56473febeeb3ef657bb5147ddd355465700, < 136a221544d919896a0f1bff8802eb51d0dff496; >= 91adb56473febeeb3ef657bb5147ddd355465700, < 57926a227a2d610f586b99de2638a02b72e99762; >= 91adb56473febeeb3ef657bb5147ddd355465700, < fa4122799a5bff6902848eafa00dc8e245ba261f; >= 91adb56473febeeb3ef657bb5147ddd355465700, < 0669c7dbd1d375f279e607a24addc2f1dae2d4f3; Linux 2.6.30.
Is there a fix for CVE-2026-139682?
Yes. Fixed in Linux 996c0df409b1cf2d4e9bb0dce0cb4ba0c1f50ed7, Linux 50485f1be262c2085443662b4a8be084fa958b9d, Linux 136a221544d919896a0f1bff8802eb51d0dff496, Linux 57926a227a2d610f586b99de2638a02b72e99762, Linux 0669c7dbd1d375f279e607a24addc2f1dae2d4f3. Upgrade Linux to 0669c7dbd1d375f279e607a24addc2f1dae2d4f3 or later.
How do I check if I'm affected by CVE-2026-139682?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.
More Linux kernel vulnerabilities
See all| Severity | Identifier / vulnerability | Technology | Signals | Age |
|---|---|---|---|---|
| MEDIUM 6.5 | CVE-2026-140063 Glib2: authenticated dos via pre-emptive 128mib read-buffer allocation in gdbusworker | Linux kernel+1 | ||
| MEDIUM 5.1 | CVE-2026-140038 Binutils: gprofng uses predictable /tmp directory with unchecked mkdir() enabling symlink-based file clobber | Linux kernel+1 | ||
| HIGH 7.3 | CVE-2026-139801 KVM: nSVM: Check validity of vmcs01 save area copied from SMRAM on RSM | Linux kernel | ||
| UNSCORED | CVE-2026-139800 9p/xen: drain response work after unbinding IRQ | Linux kernel | ||
| HIGH 7.0 | CVE-2026-139799 mm/shmem: hold off eviction in shmem_writeout() | Linux kernel |