CVE-2022-49674

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

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.19:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.19:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.19:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.19:rc4:*:*:*:*:*:*

History

24 Oct 2025, 15:51

Type Values Removed Values Added
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 7.1
CPE cpe:2.3:o:linux:linux_kernel:5.19:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.19:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.19:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.19:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
CWE CWE-125
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: dm raid: se corrigen los accesos más allá del final de la matriz de miembros raid Al cargar la tabla dm-raid (usando raid_ctr), dm-raid asigna una matriz rs->devs[rs->raid_disks] para los miembros del dispositivo raid. rs->raid_disks se define por la cantidad de metadatos raid y tuplas de imágenes pasadas al constructor del objetivo. En el caso de que se soliciten cambios en el diseño RAID, ese número puede ser diferente del número actual de miembros para los conjuntos raid existentes según lo definido en sus superbloques. Los ejemplos de cambios en el diseño RAID incluyen: - patas raid1 que se agregan/eliminan - número de franjas raid4/5/6/10 cambiado (remodelación de franjas) - toma de control a un nivel raid más alto (por ejemplo, raid5 -> raid6) Al acceder a los miembros de la matriz, se debe usar rs->raid_disks en bucles de control en lugar del valor potencialmente más grande en rs->md.raid_disks. De lo contrario, se producirá un acceso a la memoria más allá del final de la matriz rs->devs. Solucione esto modificando el código que es propenso a accesos fuera de los límites. También corrija validation_raid_redundancy() para validar todos los dispositivos que se agregan. Además, use llaves para ayudar a limpiar raid_iterate_devices(). Los accesos a la memoria fuera de los límites se descubrieron utilizando KASAN. Se verificó que esta confirmación pasara todas las pruebas RAID LVM2 (con KASAN habilitado).
First Time Linux
Linux linux Kernel
References () https://git.kernel.org/stable/c/332bd0778775d0cf105c4b9e03e460b590749916 - () https://git.kernel.org/stable/c/332bd0778775d0cf105c4b9e03e460b590749916 - Patch
References () https://git.kernel.org/stable/c/5e161a8826b63c0b8b43e4a7fad1f956780f42ab - () https://git.kernel.org/stable/c/5e161a8826b63c0b8b43e4a7fad1f956780f42ab - Patch
References () https://git.kernel.org/stable/c/6352b2f4d8e95ec0ae576d7705435d64cfa29503 - () https://git.kernel.org/stable/c/6352b2f4d8e95ec0ae576d7705435d64cfa29503 - Patch
References () https://git.kernel.org/stable/c/90de15357504c8097ab29769dc6852e16281e9e8 - () https://git.kernel.org/stable/c/90de15357504c8097ab29769dc6852e16281e9e8 - Patch
References () https://git.kernel.org/stable/c/9bf2b0757b04c78dc5d6e3a198acca98457b32a1 - () https://git.kernel.org/stable/c/9bf2b0757b04c78dc5d6e3a198acca98457b32a1 - Patch
References () https://git.kernel.org/stable/c/bcff98500ea3b4e7615ec31d2bdd326bc1ef5134 - () https://git.kernel.org/stable/c/bcff98500ea3b4e7615ec31d2bdd326bc1ef5134 - Patch
References () https://git.kernel.org/stable/c/df1a5ab0dd0775f2ea101c71f2addbc4c0ea0f85 - () https://git.kernel.org/stable/c/df1a5ab0dd0775f2ea101c71f2addbc4c0ea0f85 - Patch

26 Feb 2025, 07:01

Type Values Removed Values Added
New CVE

Information

Published : 2025-02-26 07:01

Updated : 2025-10-24 15:51


NVD link : CVE-2022-49674

Mitre link : CVE-2022-49674

CVE.ORG link : CVE-2022-49674


JSON object : View

Products Affected

linux

  • linux_kernel
CWE
CWE-125

Out-of-bounds Read