Bug 1228009 (CVE-2022-48861) - VUL-0: CVE-2022-48861: kernel: vdpa: fix use-after-free on vp_vdpa_remove
Summary: VUL-0: CVE-2022-48861: kernel: vdpa: fix use-after-free on vp_vdpa_remove
Status: NEW
Alias: CVE-2022-48861
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Security Team bot
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/414279/
Whiteboard: CVSSv3.1:SUSE:CVE-2022-48861:5.5:(AV:...
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-17 08:10 UTC by SMASH SMASH
Modified: 2024-07-17 09:54 UTC (History)
2 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SMASH SMASH 2024-07-17 08:10:04 UTC
In the Linux kernel, the following vulnerability has been resolved:

vdpa: fix use-after-free on vp_vdpa_remove

When vp_vdpa driver is unbind, vp_vdpa is freed in vdpa_unregister_device
and then vp_vdpa->mdev.pci_dev is dereferenced in vp_modern_remove,
triggering use-after-free.

Call Trace of unbinding driver free vp_vdpa :
do_syscall_64
  vfs_write
    kernfs_fop_write_iter
      device_release_driver_internal
        pci_device_remove
          vp_vdpa_remove
            vdpa_unregister_device
              kobject_release
                device_release
                  kfree

Call Trace of dereference vp_vdpa->mdev.pci_dev:
vp_modern_remove
  pci_release_selected_regions
    pci_release_region
      pci_resource_len
        pci_resource_end
          (dev)->resource[(bar)].end

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2022-48861
https://www.cve.org/CVERecord?id=CVE-2022-48861
https://git.kernel.org/stable/c/4b1743bc715a3691a63ac21b349079b07bf1b19e
https://git.kernel.org/stable/c/dc54ba9932aeaaa1a21fe214af1f446593a78274
https://git.kernel.org/stable/c/eb057b44dbe35ae14527830236a92f51de8f9184
https://git.kernel.org/pub/scm/linux/security/vulns.git/plain/cve/published/2022/CVE-2022-48861.mbox
https://bugzilla.redhat.com/show_bug.cgi?id=2298205