CVE-2022-50058

In the Linux kernel, the following vulnerability has been resolved: vdpa_sim_blk: set number of address spaces and virtqueue groups Commit bda324fd037a ("vdpasim: control virtqueue support") added two new fields (nas, ngroups) to vdpasim_dev_attr, but we forgot to initialize them for vdpa_sim_blk. When creating a new vdpa_sim_blk device this causes the kernel to panic in this way:    $ vdpa dev add mgmtdev vdpasim_blk name blk0    BUG: kernel NULL pointer dereference, address: 0000000000000030    ...    RIP: 0010:vhost_iotlb_add_range_ctx+0x41/0x220 [vhost_iotlb]    ...    Call Trace:     <TASK>     vhost_iotlb_add_range+0x11/0x800 [vhost_iotlb]     vdpasim_map_range+0x91/0xd0 [vdpa_sim]     vdpasim_alloc_coherent+0x56/0x90 [vdpa_sim]     ... This happens because vdpasim->iommu[0] is not initialized when dev_attr.nas is 0. Let's fix this issue by initializing both (nas, ngroups) to 1 for vdpa_sim_blk.
Configurations

Configuration 1 (hide)

cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*

History

13 Nov 2025, 18:08

Type Values Removed Values Added
First Time Linux
Linux linux Kernel
CWE CWE-476
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 5.5
CPE cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
References () https://git.kernel.org/stable/c/19cd4a5471b8eaa4bd161b0fdb4567f2fc88d809 - () https://git.kernel.org/stable/c/19cd4a5471b8eaa4bd161b0fdb4567f2fc88d809 - Patch
References () https://git.kernel.org/stable/c/a291c7d289fac2cb13fb2614a9a251afbbd86ce9 - () https://git.kernel.org/stable/c/a291c7d289fac2cb13fb2614a9a251afbbd86ce9 - Patch
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: vdpa_sim_blk: establecer el número de espacios de direcciones y grupos virtqueue. el commit bda324fd037a ("vdpasim: controlar la compatibilidad con virtqueue") agregó dos nuevos campos (nas, ngroups) a vdpasim_dev_attr, pero olvidamos inicializarlos para vdpa_sim_blk. Al crear un nuevo dispositivo vdpa_sim_blk esto hace que el kernel entre en pánico de esta manera: $ vdpa dev add mgmtdev vdpasim_blk name blk0 BUG: kernel NULL pointer dereference, address: 0000000000000030 ... RIP: 0010:vhost_iotlb_add_range_ctx+0x41/0x220 [vhost_iotlb] ... Call Trace: vhost_iotlb_add_range+0x11/0x800 [vhost_iotlb] vdpasim_map_range+0x91/0xd0 [vdpa_sim] vdpasim_alloc_coherent+0x56/0x90 [vdpa_sim] ... Esto sucede porque vdpasim-&gt;iommu[0] no se inicializa cuando dev_attr.nas es 0. Solucionemos este problema inicializando ambos (nas, ngroups) en 1 para vdpa_sim_blk.

18 Jun 2025, 11:15

Type Values Removed Values Added
New CVE

Information

Published : 2025-06-18 11:15

Updated : 2025-11-13 18:08


NVD link : CVE-2022-50058

Mitre link : CVE-2022-50058

CVE.ORG link : CVE-2022-50058


JSON object : View

Products Affected

linux

  • linux_kernel
CWE
CWE-476

NULL Pointer Dereference