CVE-2022-49674·Kernel vulnerability
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).
- Severity
- high
- Software
- Kernel
- Fixed in
- 5.18.10
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at <0.1% — higher than 5% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Read the two together. CVE-2022-49674 scores 7.1 on CVSS, so a successful attack would be serious — but at <0.1%, almost nobody is currently attempting it. That is a different situation from a flaw under mass exploitation, and it is usually the difference between patching on your next maintenance window and patching tonight.
Affected versions
From: 5.16
Until: 5.18.10
Fixed in: 5.18.10
How to fix this CVE
Update your Linux kernel to version 5.18.10 or later to resolve this memory access vulnerability in dm-raid. This patch corrects array boundary checks that were causing out-of-bounds memory accesses during RAID layout changes such as adding/removing raid legs or stripe reshaping. Reboot your system after applying the kernel update to activate the fix.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Check your current kernel version: uname -r
- Verify if dm-raid is in use: lsmod | grep dm_raid
- Check for RAID devices: cat /proc/mdstat
- Review kernel logs for memory errors: dmesg | grep -i 'kasan\|out of bounds\|dm-raid'
- Confirm the patch is applied by checking kernel build info: cat /proc/version | grep -i '5.18.10 or later'
FAQ
What is CVE-2022-49674?
This vulnerability is a memory safety issue in the Linux dm-raid module where array boundary checks fail during RAID configuration changes, allowing the kernel to access memory beyond the allocated device array. This can lead to kernel crashes or information disclosure.
Is CVE-2022-49674 being actively exploited?
No, this vulnerability is not being actively exploited in the wild according to CISA KEV data, and no public exploits are available.
What versions of Kernel are affected by CVE-2022-49674?
Linux kernel versions 5.16 through 5.18.9 are vulnerable. Version 5.18.10 and later contain the fix.
How do I check if my server is vulnerable to CVE-2022-49674?
Run `uname -r` and check if your kernel version is between 5.16 and 5.18.9, then verify dm-raid is active with `lsmod | grep dm_raid`. If both conditions are true, your system is vulnerable.
Does Defensia detect CVE-2022-49674?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2022-49674 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/332bd0778775d0cf105c4b9e03e460b590749916
- https://git.kernel.org/stable/c/5e161a8826b63c0b8b43e4a7fad1f956780f42ab
- https://git.kernel.org/stable/c/6352b2f4d8e95ec0ae576d7705435d64cfa29503
- https://git.kernel.org/stable/c/90de15357504c8097ab29769dc6852e16281e9e8
- https://git.kernel.org/stable/c/9bf2b0757b04c78dc5d6e3a198acca98457b32a1
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2022-49674. Free for 1 server.
Get started free