CVE-2022-50058: vdpa_sim_blk: set number of address spaces and virtqueue groups

Published Jun 18, 2025
·
Updated

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

vdpasimblk: set number of address spaces and virtqueue groups

Commit bda324fd037a ("vdpasim: control virtqueue support") added two new fields (nas, ngroups) to vdpasimdevattr, but we forgot to initialize them for vdpasimblk.

When creating a new vdpasimblk device this causes the kernel to panic in this way: $ vdpa dev add mgmtdev vdpasimblk name blk0 BUG: kernel NULL pointer dereference, address: 0000000000000030 ... RIP: 0010:vhostiotlbaddrangectx+0x41/0x220 [vhostiotlb] ... Call Trace: <TASK> vhostiotlbaddrange+0x11/0x800 [vhostiotlb] vdpasimmaprange+0x91/0xd0 [vdpasim] vdpasimalloccoherent+0x56/0x90 [vdpasim] ...

This happens because vdpasim->iommu[0] is not initialized when devattr.nas is 0.

Let's fix this issue by initializing both (nas, ngroups) to 1 for vdpasimblk.

Affected Software

6 affected componentsFixes available
Linux Kernel
Linux Linux kernel>=5.19<5.19.4
debian/linux<6.0.2-1
6.0.2-1
debian/linux<6.0.2-1
6.0.2-1
debian/linux<6.0.2-1
6.0.2-1
debian/linux
6.0.2-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.0.2-1
  2. Configuration

    Initialize both vdpasim_dev_attr fields, nas and ngroups, to 1 for vdpa_sim_blk.

    Linux kernel vdpa_sim_blk nas and ngroups = 1

Event History

Jun 18, 2025
CVE Published
via MITRE·11:02 AM
Data Sourced
via MITRE·11:02 AM
Description
Data Sourced
via NVD·11:15 AM
Description
Data Sourced
via OSV·11:15 AM
DescriptionSeverityAffected Software
Data Sourced
via Red Hat·12:06 PM
DescriptionSeverityAffected Software
Nov 13, 2025
Data Sourced
via NVD·06:08 PM
RemedySeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2022-50058?

CVE-2022-50058 is classified as a medium severity vulnerability in the Linux kernel.

2

How do I fix CVE-2022-50058?

To address CVE-2022-50058, update the Linux kernel to the latest patched version that resolves this issue.

3

What systems are affected by CVE-2022-50058?

CVE-2022-50058 affects various distributions of the Linux kernel that include the vulnerable code.

4

What is the nature of CVE-2022-50058?

CVE-2022-50058 involves improper initialization of two new fields in the vdpa_sim_blk driver.

5

Has CVE-2022-50058 been publicly disclosed?

Yes, CVE-2022-50058 has been publicly disclosed and addressed in the Linux kernel updates.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203