{"id":"CVE-2022-50058","published":"2025-06-18T11:02:06Z","modified":"2026-05-11T19:12:02Z","title":"vdpa_sim_blk: set number of address spaces and virtqueue groups","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nvdpa_sim_blk: set number of address spaces and virtqueue groups\n\nCommit bda324fd037a (\"vdpasim: control virtqueue support\") added two\nnew fields (nas, ngroups) to vdpasim_dev_attr, but we forgot to\ninitialize them for vdpa_sim_blk.\n\nWhen creating a new vdpa_sim_blk device this causes the kernel\nto panic in this way:\n    $ vdpa dev add mgmtdev vdpasim_blk name blk0\n    BUG: kernel NULL pointer dereference, address: 0000000000000030\n    ...\n    RIP: 0010:vhost_iotlb_add_range_ctx+0x41/0x220 [vhost_iotlb]\n    ...\n    Call Trace:\n     <TASK>\n     vhost_iotlb_add_range+0x11/0x800 [vhost_iotlb]\n     vdpasim_map_range+0x91/0xd0 [vdpa_sim]\n     vdpasim_alloc_coherent+0x56/0x90 [vdpa_sim]\n     ...\n\nThis happens because vdpasim->iommu[0] is not initialized when\ndev_attr.nas is 0.\n\nLet's fix this issue by initializing both (nas, ngroups) to 1 for\nvdpa_sim_blk.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.00237,"percentile":0.08871,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/a291c7d289fac2cb13fb2614a9a251afbbd86ce9","tags":[]},{"url":"https://git.kernel.org/stable/c/19cd4a5471b8eaa4bd161b0fdb4567f2fc88d809","tags":[]}],"priority":{"score":1.8,"factors":[{"name":"EPSS percentile","points":1.77}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= bda324fd037a6b0d44da5699574ce741ca161bc4, < a291c7d289fac2cb13fb2614a9a251afbbd86ce9",">= bda324fd037a6b0d44da5699574ce741ca161bc4, < 19cd4a5471b8eaa4bd161b0fdb4567f2fc88d809"]},{"vendor":"Linux","product":"Linux","versions":["5.19"]}],"euvd":{"id":"EUVD-2022-55329","exploited":false,"provenance":"source"}}