# CVE-2022-49674: dm raid: fix accesses beyond end of raid member array

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

- **Severity:** HIGH 7.1
- **CVSS:** 7.1 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; 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.29% (percentile 14, 2026-11-26)
- **CWE:** CWE-125
- **Published:** 2025-02-26T02:24:06.636Z
- **Modified:** 2026-06-17T05:18:49.283Z

## Who should check

- Anyone running Linux \>= 33e53f06850f44ec9722e08a993ecf8816e447a5, \< 5e161a8826b63c0b8b43e4a7fad1f956780f42ab; \>= 33e53f06850f44ec9722e08a993ecf8816e447a5, \< df1a5ab0dd0775f2ea101c71f2addbc4c0ea0f85; \>= 33e53f06850f44ec9722e08a993ecf8816e447a5, \< 90de15357504c8097ab29769dc6852e16281e9e8; \>= 33e53f06850f44ec9722e08a993ecf8816e447a5, \< 9bf2b0757b04c78dc5d6e3a198acca98457b32a1; \>= 33e53f06850f44ec9722e08a993ecf8816e447a5, \< 6352b2f4d8e95ec0ae576d7705435d64cfa29503; \>= 33e53f06850f44ec9722e08a993ecf8816e447a5, \< bcff98500ea3b4e7615ec31d2bdd326bc1ef5134; \>= 33e53f06850f44ec9722e08a993ecf8816e447a5, \< 332bd0778775d0cf105c4b9e03e460b590749916
- Anyone running Linux 4.8

## Description

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

dm raid: fix accesses beyond end of raid member array

On dm-raid table load (using raid\_ctr), dm-raid allocates an array
rs-\>devs\[rs-\>raid\_disks\] for the raid device members. rs-\>raid\_disks
is defined by the number of raid metadata and image tupples passed
into the target's constructor.

In the case of RAID layout changes being requested, that number can be
different from the current number of members for existing raid sets as
defined in their superblocks. Example RAID layout changes include:
- raid1 legs being added/removed
- raid4/5/6/10 number of stripes changed (stripe reshaping)
- takeover to higher raid level (e.g. raid5 -\> raid6)

When accessing array members, rs-\>raid\_disks must be used in control
loops instead of the potentially larger value in rs-\>md.raid\_disks.
Otherwise it will cause memory access beyond the end of the rs-\>devs
array.

Fix this by changing code that is prone to out-of-bounds access.
Also fix validate\_raid\_redundancy() to validate all devices that are
added. Also, use braces to help clean up raid\_iterate\_devices().

The out-of-bounds memory accesses was discovered using KASAN.

This commit was verified to pass all LVM2 RAID tests (with KASAN
enabled).

## Affected and fixed versions

- Linux: \>= 33e53f06850f44ec9722e08a993ecf8816e447a5, \< 5e161a8826b63c0b8b43e4a7fad1f956780f42ab; \>= 33e53f06850f44ec9722e08a993ecf8816e447a5, \< df1a5ab0dd0775f2ea101c71f2addbc4c0ea0f85; \>= 33e53f06850f44ec9722e08a993ecf8816e447a5, \< 90de15357504c8097ab29769dc6852e16281e9e8; \>= 33e53f06850f44ec9722e08a993ecf8816e447a5, \< 9bf2b0757b04c78dc5d6e3a198acca98457b32a1; \>= 33e53f06850f44ec9722e08a993ecf8816e447a5, \< 6352b2f4d8e95ec0ae576d7705435d64cfa29503; \>= 33e53f06850f44ec9722e08a993ecf8816e447a5, \< bcff98500ea3b4e7615ec31d2bdd326bc1ef5134; \>= 33e53f06850f44ec9722e08a993ecf8816e447a5, \< 332bd0778775d0cf105c4b9e03e460b590749916 (cvelist)
- Linux: 4.8 (cvelist)

## Mitigation

- Upgrade Linux to 332bd0778775d0cf105c4b9e03e460b590749916 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2022-49674.md
Affected: Linux >= 33e53f06850f44ec9722e08a993ecf8816e447a5, < 5e161a8826b63c0b8b43e4a7fad1f956780f42ab; >= 33e53f06850f44ec9722e08a993ecf8816e447a5, < df1a5ab0dd0775f2ea101c71f2addbc4c0ea0f85; >= 33e53f06850f44ec9722e08a993ecf8816e447a5, < 90de15357504c8097ab29769dc6852e16281e9e8; >= 33e53f06850f44ec9722e08…
Fixed in: Linux 5e161a8826b63c0b8b43e4a7fad1f956780f42ab, Linux 90de15357504c8097ab29769dc6852e16281e9e8, Linux 9bf2b0757b04c78dc5d6e3a198acca98457b32a1, Linux 6352b2f4d8e95ec0ae576d7705435d64cfa29503, Linux 332bd0778775d0cf105c4b9e03e460b590749916

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-49674 being exploited?

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

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

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

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

Linux \>= 33e53f06850f44ec9722e08a993ecf8816e447a5, \< 5e161a8826b63c0b8b43e4a7fad1f956780f42ab; \>= 33e53f06850f44ec9722e08a993ecf8816e447a5, \< df1a5ab0dd0775f2ea101c71f2addbc4c0ea0f85; \>= 33e53f06850f44ec9722e08a993ecf8816e447a5, \< 90de15357504c8097ab29769dc6852e16281e9e8; \>= 33e53f06850f44ec9722e08a993ecf8816e447a5, \< 9bf2b0757b04c78dc5d6e3a198acca98457b32a1; \>= 33e53f06850f44ec9722e08a993ecf8816e447a5, \< 6352b2f4d8e95ec0ae576d7705435d64cfa29503; \>= 33e53f06850f44ec9722e08a993ecf8816e447a5, \< bcff98500ea3b4e7615ec31d2bdd326bc1ef5134; \>= 33e53f06850f44ec9722e08a993ecf8816e447a5, \< 332bd0778775d0cf105c4b9e03e460b590749916; Linux 4.8.

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

Yes. Fixed in Linux 5e161a8826b63c0b8b43e4a7fad1f956780f42ab, Linux 90de15357504c8097ab29769dc6852e16281e9e8, Linux 9bf2b0757b04c78dc5d6e3a198acca98457b32a1, Linux 6352b2f4d8e95ec0ae576d7705435d64cfa29503, Linux 332bd0778775d0cf105c4b9e03e460b590749916. Upgrade Linux to 332bd0778775d0cf105c4b9e03e460b590749916 or later.

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

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/5e161a8826b63c0b8b43e4a7fad1f956780f42ab>
- patch: <https://git.kernel.org/stable/c/df1a5ab0dd0775f2ea101c71f2addbc4c0ea0f85>
- patch: <https://git.kernel.org/stable/c/90de15357504c8097ab29769dc6852e16281e9e8>
- patch: <https://git.kernel.org/stable/c/9bf2b0757b04c78dc5d6e3a198acca98457b32a1>
- patch: <https://git.kernel.org/stable/c/6352b2f4d8e95ec0ae576d7705435d64cfa29503>
- patch: <https://git.kernel.org/stable/c/bcff98500ea3b4e7615ec31d2bdd326bc1ef5134>
- patch: <https://git.kernel.org/stable/c/332bd0778775d0cf105c4b9e03e460b590749916>

## 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-49674>

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