Bug 2502468 (CVE-2026-63907)

Summary: CVE-2026-63907 kernel: uio: uio_pci_generic_sva: fix double free of devm_kzalloc() memory
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: rhel-process-autobot, watson-tool-maintainers
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A flaw was found in the `uio_pci_generic_sva` module of the Linux kernel. This vulnerability, a double free, occurs because memory allocated with `devm_kzalloc()` is automatically freed, but the `kfree(udev)` function is also explicitly called during both error handling and device removal. A local attacker could exploit this double free to cause memory corruption, potentially leading to a denial of service (DoS) on the system.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2026-07-19 16:09:45 UTC
In the Linux kernel, the following vulnerability has been resolved:

uio: uio_pci_generic_sva: fix double free of devm_kzalloc() memory

uio_pci_sva allocates struct uio_pci_sva_dev with devm_kzalloc() in
probe(), but then calls kfree(udev) both on the probe() error path
(label out_free) and again in remove().

Because devm_kzalloc() allocations are devres-managed and are freed
automatically when the device is detached (including after a failing
probe() and during driver unbind), the explicit kfree() can lead to a
double free.

If probe() fails after devm_kzalloc(), the error path frees udev and
devres cleanup will free it again when the core unwinds the partially
bound device. On normal driver removal, remove() frees udev and devres
will free it again when the device is detached.

This issue was identified by a static analysis tool I developed and
confirmed by manual review. Fix by removing the manual kfree() calls
and dropping the now-unused label.

Comment 1 Mauro Matteo Cascella 2026-07-21 10:57:42 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2026071945-CVE-2026-63907-709c@gregkh/T