# CVE-2022-49526: md/bitmap: don't set sb values if can't pass sanity check

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.32% (percentile 18, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2025-02-26T02:13:49.145Z
- **Modified:** 2026-11-05T20:17:07.103Z

## Who should check

- Anyone running Linux \>= ef99bf480de9bde9d3b2afdf05324670fab4e571, \< 422e8f7ba1e08c8e0e88d375bcb550bc2bbfe96d; \>= ef99bf480de9bde9d3b2afdf05324670fab4e571, \< 0959aa00f9765bd8c654b1365012e41b51c733cc; \>= ef99bf480de9bde9d3b2afdf05324670fab4e571, \< e69e93120f6219b9cc4fba3b515b6ababd8548aa; \>= ef99bf480de9bde9d3b2afdf05324670fab4e571, \< 27f672af28a8e9b783ff7f0eaf7ef2fbd5a2f4ba; \>= ef99bf480de9bde9d3b2afdf05324670fab4e571, \< cf9392282a2cf5a8d83dd1c5aa1a097e12f172bc; \>= ef99bf480de9bde9d3b2afdf05324670fab4e571, \< d8f1558e1daf54f53a90b4c5700ae3e3a4b13412; \>= ef99bf480de9bde9d3b2afdf05324670fab4e571, \< e68cb83a57a458b01c9739e2ad9cb70b04d1e6d2
- Anyone running Linux 3.5

## Description

In the Linux kernel, the following vulnerability has been resolved:

md/bitmap: don't set sb values if can't pass sanity check

If bitmap area contains invalid data, kernel will crash then mdadm
triggers "Segmentation fault".
This is cluster-md speical bug. In non-clustered env, mdadm will
handle broken metadata case. In clustered array, only kernel space
handles bitmap slot info. But even this bug only happened in clustered
env, current sanity check is wrong, the code should be changed.

How to trigger: (faulty injection)

dd if=/dev/zero bs=1M count=1 oflag=direct of=/dev/sda
dd if=/dev/zero bs=1M count=1 oflag=direct of=/dev/sdb
mdadm -C /dev/md0 -b clustered -e 1.2 -n 2 -l mirror /dev/sda /dev/sdb
mdadm -Ss
echo aaa \> magic.txt
 == below modifying slot 2 bitmap data ==
dd if=magic.txt of=/dev/sda seek=16384 bs=1 count=3 \<== destroy magic
dd if=/dev/zero of=/dev/sda seek=16436 bs=1 count=4 \<== ZERO chunksize
mdadm -A /dev/md0 /dev/sda /dev/sdb
 == kernel crashes. mdadm outputs "Segmentation fault" ==

Reason of kernel crash:

In md\_bitmap\_read\_sb (called by md\_bitmap\_create), bad bitmap magic didn't
block chunksize assignment, and zero value made DIV\_ROUND\_UP\_SECTOR\_T()
trigger "divide error".

Crash log:

kernel: md: md0 stopped.
kernel: md/raid1:md0: not clean -- starting background reconstruction
kernel: md/raid1:md0: active with 2 out of 2 mirrors
kernel: dlm: ... ...
kernel: md-cluster: Joined cluster 44810aba-38bb-e6b8-daca-bc97a0b254aa slot 1
kernel: md0: invalid bitmap file superblock: bad magic
kernel: md\_bitmap\_copy\_from\_slot can't get bitmap from slot 2
kernel: md-cluster: Could not gather bitmaps from slot 2
kernel: divide error: 0000 \[\#1\] SMP NOPTI
kernel: CPU: 0 PID: 1603 Comm: mdadm Not tainted 5.14.6-1-default
kernel: Hardware name: QEMU Standard PC (i440FX + PIIX, 1996)
kernel: RIP: 0010:md\_bitmap\_create+0x1d1/0x850 \[md\_mod\]
kernel: RSP: 0018:ffffc22ac0843ba0 EFLAGS: 00010246
kernel: ... ...
kernel: Call Trace:
kernel:  ? dlm\_lock\_sync+0xd0/0xd0 \[md\_cluster 77fe..7a0\]
kernel:  md\_bitmap\_copy\_from\_slot+0x2c/0x290 \[md\_mod 24ea..d3a\]
kernel:  load\_bitmaps+0xec/0x210 \[md\_cluster 77fe..7a0\]
kernel:  md\_bitmap\_load+0x81/0x1e0 \[md\_mod 24ea..d3a\]
kernel:  do\_md\_run+0x30/0x100 \[md\_mod 24ea..d3a\]
kernel:  md\_ioctl+0x1290/0x15a0 \[md\_mod 24ea....d3a\]
kernel:  ? mddev\_unlock+0xaa/0x130 \[md\_mod 24ea..d3a\]
kernel:  ? blkdev\_ioctl+0xb1/0x2b0
kernel:  block\_ioctl+0x3b/0x40
kernel:  \_\_x64\_sys\_ioctl+0x7f/0xb0
kernel:  do\_syscall\_64+0x59/0x80
kernel:  ? exit\_to\_user\_mode\_prepare+0x1ab/0x230
kernel:  ? syscall\_exit\_to\_user\_mode+0x18/0x40
kernel:  ? do\_syscall\_64+0x69/0x80
kernel:  entry\_SYSCALL\_64\_after\_hwframe+0x44/0xae
kernel: RIP: 0033:0x7f4a15fa722b
kernel: ... ...
kernel: ---\[ end trace 8afa7612f559c868 \]---
kernel: RIP: 0010:md\_bitmap\_create+0x1d1/0x850 \[md\_mod\]

## Affected and fixed versions

- Linux: \>= ef99bf480de9bde9d3b2afdf05324670fab4e571, \< 422e8f7ba1e08c8e0e88d375bcb550bc2bbfe96d; \>= ef99bf480de9bde9d3b2afdf05324670fab4e571, \< 0959aa00f9765bd8c654b1365012e41b51c733cc; \>= ef99bf480de9bde9d3b2afdf05324670fab4e571, \< e69e93120f6219b9cc4fba3b515b6ababd8548aa; \>= ef99bf480de9bde9d3b2afdf05324670fab4e571, \< 27f672af28a8e9b783ff7f0eaf7ef2fbd5a2f4ba; \>= ef99bf480de9bde9d3b2afdf05324670fab4e571, \< cf9392282a2cf5a8d83dd1c5aa1a097e12f172bc; \>= ef99bf480de9bde9d3b2afdf05324670fab4e571, \< d8f1558e1daf54f53a90b4c5700ae3e3a4b13412; \>= ef99bf480de9bde9d3b2afdf05324670fab4e571, \< e68cb83a57a458b01c9739e2ad9cb70b04d1e6d2 (cvelist)
- Linux: 3.5 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-49526. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-49526.md
Affected: Linux >= ef99bf480de9bde9d3b2afdf05324670fab4e571, < 422e8f7ba1e08c8e0e88d375bcb550bc2bbfe96d; >= ef99bf480de9bde9d3b2afdf05324670fab4e571, < 0959aa00f9765bd8c654b1365012e41b51c733cc; >= ef99bf480de9bde9d3b2afdf05324670fab4e571, < e69e93120f6219b9cc4fba3b515b6ababd8548aa; >= ef99bf480de9bde9d3b2afd…
Fixed in: Linux 422e8f7ba1e08c8e0e88d375bcb550bc2bbfe96d, Linux 0959aa00f9765bd8c654b1365012e41b51c733cc, Linux 27f672af28a8e9b783ff7f0eaf7ef2fbd5a2f4ba

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.
```

## FAQ

### Is CVE-2022-49526 being exploited?

There is no confirmed exploitation: CVE-2022-49526 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.32% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-49526?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-49526?

Linux \>= ef99bf480de9bde9d3b2afdf05324670fab4e571, \< 422e8f7ba1e08c8e0e88d375bcb550bc2bbfe96d; \>= ef99bf480de9bde9d3b2afdf05324670fab4e571, \< 0959aa00f9765bd8c654b1365012e41b51c733cc; \>= ef99bf480de9bde9d3b2afdf05324670fab4e571, \< e69e93120f6219b9cc4fba3b515b6ababd8548aa; \>= ef99bf480de9bde9d3b2afdf05324670fab4e571, \< 27f672af28a8e9b783ff7f0eaf7ef2fbd5a2f4ba; \>= ef99bf480de9bde9d3b2afdf05324670fab4e571, \< cf9392282a2cf5a8d83dd1c5aa1a097e12f172bc; \>= ef99bf480de9bde9d3b2afdf05324670fab4e571, \< d8f1558e1daf54f53a90b4c5700ae3e3a4b13412; \>= ef99bf480de9bde9d3b2afdf05324670fab4e571, \< e68cb83a57a458b01c9739e2ad9cb70b04d1e6d2; Linux 3.5.

### Is there a fix for CVE-2022-49526?

Yes. Fixed in Linux 422e8f7ba1e08c8e0e88d375bcb550bc2bbfe96d, Linux 0959aa00f9765bd8c654b1365012e41b51c733cc, Linux 27f672af28a8e9b783ff7f0eaf7ef2fbd5a2f4ba. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2022-49526?

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.

## References

- patch: <https://git.kernel.org/stable/c/422e8f7ba1e08c8e0e88d375bcb550bc2bbfe96d>
- patch: <https://git.kernel.org/stable/c/0959aa00f9765bd8c654b1365012e41b51c733cc>
- patch: <https://git.kernel.org/stable/c/e69e93120f6219b9cc4fba3b515b6ababd8548aa>
- patch: <https://git.kernel.org/stable/c/27f672af28a8e9b783ff7f0eaf7ef2fbd5a2f4ba>
- patch: <https://git.kernel.org/stable/c/cf9392282a2cf5a8d83dd1c5aa1a097e12f172bc>
- patch: <https://git.kernel.org/stable/c/d8f1558e1daf54f53a90b4c5700ae3e3a4b13412>
- patch: <https://git.kernel.org/stable/c/e68cb83a57a458b01c9739e2ad9cb70b04d1e6d2>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-49526>

HTML: <https://flawdb.com/CVE-2022-49526> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-49526>
