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

staging: media: ipu7: fix double-free and use-after-free in error paths

In both ipu7_isys_init() and ipu7_psys_init(), pdata is allocated and
then passed to ipu7_bus_initialize_device(), which stores it in
adev->pdata. The ipu7_bus_release() function frees adev->pdata when the
device's reference count drops to zero.

Two error paths incorrectly call kfree(pdata) after the device teardown
has already freed it:

1. When ipu7_mmu_init() fails: put_device() is called, which drops the
reference count to zero and triggers ipu7_bus_release() ->
kfree(pdata). The subsequent kfree(pdata) is a double-free.

2. When ipu7_bus_add_device() fails: it calls auxiliary_device_uninit()
internally, which calls put_device() -> ipu7_bus_release() ->
kfree(pdata). The subsequent kfree(pdata) is again a double-free.

Note that the kfree(pdata) when ipu7_bus_initialize_device() itself
fails is correct, because in that case auxiliary_device_init() failed
and the release function was never set up, so pdata must be freed
manually.

Additionally, the error code was not saved before calling put_device(),
causing ERR_CAST() to dereference the already-freed adev pointer when
constructing the return value. Fix this by saving the error from
dev_err_probe() before put_device() and returning ERR_PTR() instead.

Remove the redundant kfree(pdata) calls and fix the use-after-free in
the return values of the two affected error paths.
Published: 2026-07-25
Score: 7.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

In the Linux kernel’s ipu7 media staging driver, two initialization error paths perform a double‑free of the device’s private data, and a subsequent use‑after‑free can dereference a stale pointer while constructing an error return value. This defect can lead to kernel crashes or corruption of kernel memory. The vulnerability does not disclose data or provide a direct information‑leak scenario; its primary impact is on kernel stability and integrity.

Affected Systems

The flaw exists in all Linux kernel releases that contain the unpatched ipu7 staging driver before the resolution commits referenced in the advisory (e.g., commit 837c1f9655421055f751ed34745e820a54a27642 and later). Distribution kernels that ship with this driver and have not incorporated the fixes are affected; the advisory does not specify individual kernel versions.

Risk and Exploitability

The CVSS score of 7.8 indicates a high‑severity criticality. The EPSS score is reported as less than 1 %, implying a very low probability of active exploitation. The vulnerability is not listed in the CISA KEV catalog. The likely attack vector is indirect: an attacker would need to cause a driver initialization failure, which typically requires local or privileged execution. Based on the description, it is inferred that exploitation would involve triggering the error paths that free the device structure prematurely. If successful, the exploitation could compromise kernel integrity and cause a system crash or unstable behaviour.

Generated by OpenCVE AI on August 2, 2026 at 12:38 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the kernel patch that includes commit 837c1f9655421055f751ed34745e820a54a27642 or any later commit that resolves the double‑free and use‑after‑free in the ipu7 driver.
  • If a managed distribution kernel does not yet include the patch, backport the changes from the referenced commit(s) to your current kernel source and rebuild the kernel.
  • If a kernel upgrade or backport is not feasible, disable the ipu7 media driver or remove the hardware device from the system to prevent the faulty code paths from being exercised.

Generated by OpenCVE AI on August 2, 2026 at 12:38 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 30 Jul 2026 12:15:00 +0000


Mon, 27 Jul 2026 05:15:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}


Sat, 25 Jul 2026 09:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: staging: media: ipu7: fix double-free and use-after-free in error paths In both ipu7_isys_init() and ipu7_psys_init(), pdata is allocated and then passed to ipu7_bus_initialize_device(), which stores it in adev->pdata. The ipu7_bus_release() function frees adev->pdata when the device's reference count drops to zero. Two error paths incorrectly call kfree(pdata) after the device teardown has already freed it: 1. When ipu7_mmu_init() fails: put_device() is called, which drops the reference count to zero and triggers ipu7_bus_release() -> kfree(pdata). The subsequent kfree(pdata) is a double-free. 2. When ipu7_bus_add_device() fails: it calls auxiliary_device_uninit() internally, which calls put_device() -> ipu7_bus_release() -> kfree(pdata). The subsequent kfree(pdata) is again a double-free. Note that the kfree(pdata) when ipu7_bus_initialize_device() itself fails is correct, because in that case auxiliary_device_init() failed and the release function was never set up, so pdata must be freed manually. Additionally, the error code was not saved before calling put_device(), causing ERR_CAST() to dereference the already-freed adev pointer when constructing the return value. Fix this by saving the error from dev_err_probe() before put_device() and returning ERR_PTR() instead. Remove the redundant kfree(pdata) calls and fix the use-after-free in the return values of the two affected error paths.
Title staging: media: ipu7: fix double-free and use-after-free in error paths
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-08-05T12:42:10.786Z

Reserved: 2026-07-19T15:36:31.788Z

Link: CVE-2026-64447

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-07-25T10:17:29.437

Modified: 2026-08-11T15:01:50.637

Link: CVE-2026-64447

cve-icon Redhat

Severity :

Publid Date: 2026-07-25T00:00:00Z

Links: CVE-2026-64447 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-02T12:45:06Z

Weaknesses
  • CWE-1341

    Multiple Releases of Same Resource or Handle