CyberAlerts is shutting down on June 30th, 2025. Thank you for your support!

CVE-2025-21688: drm/v3d: Assign job pointer to NULL before signaling the fence

Description

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

drm/v3d: Assign job pointer to NULL before signaling the fence

In commit e4b5ccd392b9 ("drm/v3d: Ensure job pointer is set to NULL
after job completion"), we introduced a change to assign the job pointer
to NULL after completing a job, indicating job completion.

However, this approach created a race condition between the DRM
scheduler workqueue and the IRQ execution thread. As soon as the fence is
signaled in the IRQ execution thread, a new job starts to be executed.
This results in a race condition where the IRQ execution thread sets the
job pointer to NULL simultaneously as the `run_job()` function assigns
a new job to the pointer.

This race condition can lead to a NULL pointer dereference if the IRQ
execution thread sets the job pointer to NULL after `run_job()` assigns
it to the new job. When the new job completes and the GPU emits an
interrupt, `v3d_irq()` is triggered, potentially causing a crash.

[ 466.310099] Unable to handle kernel NULL pointer dereference at virtual address 00000000000000c0
[ 466.318928] Mem abort info:
[ 466.321723] ESR = 0x0000000096000005
[ 466.325479] EC = 0x25: DABT (current EL), IL = 32 bits
[ 466.330807] SET = 0, FnV = 0
[ 466.333864] EA = 0, S1PTW = 0
[ 466.337010] FSC = 0x05: level 1 translation fault
[ 466.341900] Data abort info:
[ 466.344783] ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000
[ 466.350285] CM = 0, WnR = 0, TnD = 0, TagAccess = 0...

Classification

CVE ID: CVE-2025-21688

Affected Products

Vendor: Linux

Product: Linux

Exploit Prediction Scoring System (EPSS)

EPSS Score: 0.04% (probability of being exploited)

EPSS Percentile: 5.04% (scored less or equal to compared to others)

EPSS Date: 2025-03-11 (when was this score calculated)

References

https://git.kernel.org/stable/c/9793206fbf5293534c3a79d78f196e2cbb48c22d
https://git.kernel.org/stable/c/1f66a3a1a516e4d545906916b3f3c8d1c5e909e6
https://git.kernel.org/stable/c/6cfafcad46e95351c477da0ae7e3acb8f7550ada
https://git.kernel.org/stable/c/a9401cd5d1bb5a0b8d2bef09623ca43551cd6e8a
https://git.kernel.org/stable/c/431fb709db434565b5e7cee82a11bd681a794fd3
https://git.kernel.org/stable/c/01a7e3a43ee2e6607169a75889412344c10b37fd
https://git.kernel.org/stable/c/3059e7aaa280daea57bb069fbc65225e1bb95014
https://git.kernel.org/stable/c/6e64d6b3a3c39655de56682ec83e894978d23412

Timeline