CVE-2022-49674

Updated on 26 Feb 2025

Severity

7.1 High severity

Details

CVSS score
7.1
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H

Overview

About 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).

Details

Fixes

KernelCare state

Live-patch status from KernelCare for each operating system.

Operating system Status Covered kernels
Amazon Linux 2 Planned —
Amazon Linux 2 5.10 Will Not Fix —
Amazon Linux 2 5.4 Will Not Fix —
CentOS 7 ELS Released
31 kernels
  • 3.10.0-1160.119.1.el7.tuxcare.els10
  • 3.10.0-1160.119.1.el7.tuxcare.els4
  • 3.10.0-1160.119.1.el7.tuxcare.els6
  • 3.10.0-1160.119.1.el7.tuxcare.els15
  • 3.10.0-1160.119.1.el7.tuxcare.els5
  • 3.10.0-1160.119.1.el7.tuxcare.els3
  • 3.10.0-1160.119.1.el7.tuxcare.els14
  • 3.10.0-1160.119.1.el7.tuxcare.els16
  • 3.10.0-1160.119.1.el7.tuxcare.els13
  • 3.10.0-1160.119.1.el7.tuxcare.els7
  • 3.10.0-1160.119.1.el7.tuxcare.els12
  • 3.10.0-1160.119.1.el7.tuxcare.els9
  • 3.10.0-1160.119.1.el7.tuxcare.els8
  • 3.10.0-1160.119.1.el7.tuxcare.els17
  • 3.10.0-1160.119.1.el7.tuxcare.els18
  • 3.10.0-1160.119.1.el7.tuxcare.els19
  • 3.10.0-1160.119.1.el7.tuxcare.els20
  • 3.10.0-1160.119.1.el7.tuxcare.els21
  • 3.10.0-1160.119.1.el7.tuxcare.els24
  • 3.10.0-1160.119.1.el7.tuxcare.els22
  • 3.10.0-1160.119.1.el7.tuxcare.els25
  • 3.10.0-1160.139.1.el7.tuxcare.els2
  • 3.10.0-1160.139.1.el7.tuxcare.els3
  • 3.10.0-1160.139.1.el7.tuxcare.els4
  • 3.10.0-1160.142.1.el7.tuxcare.els1
  • 3.10.0-1160.144.1.el7.tuxcare.els1
  • 3.10.0-1160.144.1.el7.tuxcare.els2
  • 3.10.0-1160.144.1.el7.tuxcare.els3
  • 3.10.0-1160.144.1.el7.tuxcare.els4
  • 3.10.0-1160.144.1.el7.tuxcare.els5
  • 3.10.0-1160.144.1.el7.tuxcare.els6
Debian 11 Planned —
RHEL 8 Planned —
RHEL8 EUS 8.6 Released
62 kernels
  • 4.18.0-372.51.1.el8_6
  • 4.18.0-372.46.1.el8_6
  • 4.18.0-372.41.1.el8_6
  • 4.18.0-372.36.1.el8_6
  • 4.18.0-372.52.1.el8_6
  • 4.18.0-372.57.1.el8_6
  • 4.18.0-372.64.1.el8_6
  • 4.18.0-372.70.1.el8_6
  • 4.18.0-372.75.1.el8_6
  • 4.18.0-372.80.1.el8_6
  • 4.18.0-372.87.1.el8_6
  • 4.18.0-372.91.1.el8_6
  • 4.18.0-372.93.1.el8_6
  • 4.18.0-372.95.1.el8_6
  • 4.18.0-372.98.1.el8_6
  • 4.18.0-372.100.1.el8_6
  • 4.18.0-372.102.1.el8_6
  • 4.18.0-372.105.1.el8_6
  • 4.18.0-372.107.1.el8_6
  • 4.18.0-372.111.1.el8_6
  • 4.18.0-372.118.1.el8_6
  • 4.18.0-372.119.1.el8_6
  • 4.18.0-372.113.1.el8_6
  • 4.18.0-372.109.1.el8_6
  • 4.18.0-372.115.1.el8_6
  • 4.18.0-372.121.1.el8_6
  • 4.18.0-372.123.1.el8_6
  • 4.18.0-372.124.1.el8_6
  • 4.18.0-372.125.1.el8_6
  • 4.18.0-372.126.1.el8_6
  • 4.18.0-372.127.1.el8_6
  • 4.18.0-372.129.1.el8_6
  • 4.18.0-372.131.1.el8_6
  • 4.18.0-372.133.1.el8_6
  • 4.18.0-372.134.1.el8_6
  • 4.18.0-372.137.1.el8_6
  • 4.18.0-372.139.1.el8_6
  • 4.18.0-372.141.1.el8_6
  • 4.18.0-372.142.1.el8_6
  • 4.18.0-372.143.1.el8_6
  • 4.18.0-372.145.1.el8_6
  • 4.18.0-372.149.1.el8_6
  • 4.18.0-372.150.1.el8_6
  • 4.18.0-372.151.1.el8_6
  • 4.18.0-372.153.1.el8_6
  • 4.18.0-372.155.1.el8_6
  • 4.18.0-372.157.1.el8_6
  • 4.18.0-372.158.1.el8_6
  • 4.18.0-372.160.1.el8_6
  • 4.18.0-372.162.1.el8_6
  • 4.18.0-372.164.1.el8_6
  • 4.18.0-372.166.1.el8_6
  • 4.18.0-372.168.1.el8_6
  • 4.18.0-372.170.1.el8_6
  • 4.18.0-372.172.1.el8_6
  • 4.18.0-372.173.1.el8_6
  • 4.18.0-372.175.1.el8_6
  • 4.18.0-372.177.1.el8_6
  • 4.18.0-372.179.1.el8_6
  • 4.18.0-372.181.1.el8_6
  • 4.18.0-372.183.1.el8_6
  • 4.18.0-372.185.1.el8_6
Ubuntu 18.04 Planned —
Ubuntu 18.04 AWS Focal Planned —
Ubuntu 20.04 Planned —
Ubuntu 22.04 Planned —