CVE-2026-64099 in Linuxinfo

Summary

by MITRE • 07/19/2026

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

drm/v3d: Fix use-after-free of CPU job query arrays on error path

The CPU job ioctl's fail label calls kvfree() on cpu_job's timestamp and performance query arrays after v3d_job_cleanup(), which drops the job's last reference and frees cpu_job. Reading cpu_job at that point is a use-after-free. Also, on the early v3d_job_init() failure path, it is a NULL dereference, since v3d_job_deallocate() zeroes the local pointer.

In the success path, the arrays are released from the scheduler's .free_job callback, but on the error path, they are freed manually, as the job was never pushed to the scheduler. While the success path deals with this correctly, the fail path doesn't.

On top of that, the manual kvfree() calls only free the array storage; they don't drm_syncobj_put() the per-query syncobjs that v3d_timestamp_query_info_free() and v3d_performance_query_info_free() release on the success path. So the same fail path that triggers the use-after-free also leaks one syncobj reference per query.

Unify the CPU job teardown into the CPU job's kref destructor, mirroring v3d_render_job_free(). The scheduler's .free_job slot reverts to the generic v3d_sched_job_free() and the fail label drops the manual kvfree() calls, leaving a single teardown path that is reached from both the scheduler and the ioctl error path. That removes the use-after-free, the NULL dereference, and the syncobj leak by construction.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 07/19/2026

The vulnerability described represents a critical use-after-free condition in the linux kernel's v3d graphics driver component that affects the drm/v3d subsystem. This issue occurs within the cpu job ioctl implementation where improper resource management leads to memory corruption and potential privilege escalation opportunities. The flaw manifests when error conditions are encountered during job processing, creating a scenario where memory is accessed after it has been freed, violating fundamental memory safety principles that modern operating systems must maintain.

The technical root cause stems from inconsistent cleanup procedures between successful and failed execution paths within the v3d driver's cpu job handling mechanism. When v3d_job_cleanup() is invoked on the error path, it releases the cpu_job structure through reference counting, but subsequent code attempts to access already freed memory locations during kvfree() operations on timestamp and performance query arrays. This represents a classic use-after-free vulnerability categorized under CWE-416, where memory is accessed after it has been freed, potentially allowing attackers to execute arbitrary code or cause system instability.

The problem extends beyond simple memory corruption to include null pointer dereference conditions that occur during early v3d_job_init() failure scenarios. When initialization fails, the code path attempts to call v3d_job_deallocate() which zeros the local pointer, but subsequent operations still reference this null value. This dual vulnerability creates multiple attack vectors within the same code section, making the exploit surface more extensive than typical single-vulnerability cases.

Additionally, the error handling path introduces synchronization object reference leaks through missing drm_syncobj_put() calls on per-query syncobjs. While the success path properly handles these resources via v3d_timestamp_query_info_free() and v3d_performance_query_info_free(), the error path omits this cleanup, creating resource leakage that can lead to system resource exhaustion over time. This memory leak aspect combined with the use-after-free creates a particularly dangerous vulnerability pattern.

The proposed solution implements a unified teardown mechanism by converting the cpu job cleanup into the kref destructor, following the established pattern used by v3d_render_job_free(). This architectural change consolidates all cleanup operations into a single, authoritative path that is invoked from both the scheduler's .free_job callback and the ioctl error handling code. The approach eliminates the use-after-free by ensuring proper ordering of resource release, prevents null pointer dereferences through consistent initialization patterns, and resolves syncobj reference leaks by guaranteeing complete resource cleanup regardless of execution path taken.

This remediation aligns with ATT&CK technique T1068 by addressing privilege escalation paths through kernel memory corruption vulnerabilities. The fix follows secure coding practices recommended in the Linux kernel security guidelines, specifically targeting improper resource management patterns that have historically led to exploitation. By centralizing resource cleanup logic and eliminating code duplication between success and error paths, the solution reduces attack surface while maintaining system stability and security posture against both local privilege escalation and denial of service attacks. The implementation effectively addresses CWE-416 use-after-free conditions, CWE-476 null pointer dereference issues, and CWE-401 memory leaks through proper resource lifecycle management in kernel space operations.

Responsible

Linux

Reservation

07/19/2026

Disclosure

07/19/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

low

Sources

Do you want to use VulDB in your project?

Use the official API to access entries easily!