CVE-2025-21688

Severity CVSS v4.0:
Pending analysis
Type:
CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
Publication date:
10/02/2025
Last modified:
03/11/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> drm/v3d: Assign job pointer to NULL before signaling the fence<br /> <br /> In commit e4b5ccd392b9 ("drm/v3d: Ensure job pointer is set to NULL<br /> after job completion"), we introduced a change to assign the job pointer<br /> to NULL after completing a job, indicating job completion.<br /> <br /> However, this approach created a race condition between the DRM<br /> scheduler workqueue and the IRQ execution thread. As soon as the fence is<br /> signaled in the IRQ execution thread, a new job starts to be executed.<br /> This results in a race condition where the IRQ execution thread sets the<br /> job pointer to NULL simultaneously as the `run_job()` function assigns<br /> a new job to the pointer.<br /> <br /> This race condition can lead to a NULL pointer dereference if the IRQ<br /> execution thread sets the job pointer to NULL after `run_job()` assigns<br /> it to the new job. When the new job completes and the GPU emits an<br /> interrupt, `v3d_irq()` is triggered, potentially causing a crash.<br /> <br /> [ 466.310099] Unable to handle kernel NULL pointer dereference at virtual address 00000000000000c0<br /> [ 466.318928] Mem abort info:<br /> [ 466.321723] ESR = 0x0000000096000005<br /> [ 466.325479] EC = 0x25: DABT (current EL), IL = 32 bits<br /> [ 466.330807] SET = 0, FnV = 0<br /> [ 466.333864] EA = 0, S1PTW = 0<br /> [ 466.337010] FSC = 0x05: level 1 translation fault<br /> [ 466.341900] Data abort info:<br /> [ 466.344783] ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000<br /> [ 466.350285] CM = 0, WnR = 0, TnD = 0, TagAccess = 0<br /> [ 466.355350] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0<br /> [ 466.360677] user pgtable: 4k pages, 39-bit VAs, pgdp=0000000089772000<br /> [ 466.367140] [00000000000000c0] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000<br /> [ 466.375875] Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP<br /> [ 466.382163] Modules linked in: rfcomm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device algif_hash algif_skcipher af_alg bnep binfmt_misc vc4 snd_soc_hdmi_codec drm_display_helper cec brcmfmac_wcc spidev rpivid_hevc(C) drm_client_lib brcmfmac hci_uart drm_dma_helper pisp_be btbcm brcmutil snd_soc_core aes_ce_blk v4l2_mem2mem bluetooth aes_ce_cipher snd_compress videobuf2_dma_contig ghash_ce cfg80211 gf128mul snd_pcm_dmaengine videobuf2_memops ecdh_generic sha2_ce ecc videobuf2_v4l2 snd_pcm v3d sha256_arm64 rfkill videodev snd_timer sha1_ce libaes gpu_sched snd videobuf2_common sha1_generic drm_shmem_helper mc rp1_pio drm_kms_helper raspberrypi_hwmon spi_bcm2835 gpio_keys i2c_brcmstb rp1 raspberrypi_gpiomem rp1_mailbox rp1_adc nvmem_rmem uio_pdrv_genirq uio i2c_dev drm ledtrig_pattern drm_panel_orientation_quirks backlight fuse dm_mod ip_tables x_tables ipv6<br /> [ 466.458429] CPU: 0 UID: 1000 PID: 2008 Comm: chromium Tainted: G C 6.13.0-v8+ #18<br /> [ 466.467336] Tainted: [C]=CRAP<br /> [ 466.470306] Hardware name: Raspberry Pi 5 Model B Rev 1.0 (DT)<br /> [ 466.476157] pstate: 404000c9 (nZcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)<br /> [ 466.483143] pc : v3d_irq+0x118/0x2e0 [v3d]<br /> [ 466.487258] lr : __handle_irq_event_percpu+0x60/0x228<br /> [ 466.492327] sp : ffffffc080003ea0<br /> [ 466.495646] x29: ffffffc080003ea0 x28: ffffff80c0c94200 x27: 0000000000000000<br /> [ 466.502807] x26: ffffffd08dd81d7b x25: ffffff80c0c94200 x24: ffffff8003bdc200<br /> [ 466.509969] x23: 0000000000000001 x22: 00000000000000a7 x21: 0000000000000000<br /> [ 466.517130] x20: ffffff8041bb0000 x19: 0000000000000001 x18: 0000000000000000<br /> [ 466.524291] x17: ffffffafadfb0000 x16: ffffffc080000000 x15: 0000000000000000<br /> [ 466.531452] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000<br /> [ 466.538613] x11: 0000000000000000 x10: 0000000000000000 x9 : ffffffd08c527eb0<br /> [ 466.545777] x8 : 0000000000000000 x7 : 0000000000000000 x6 : 0000000000000000<br /> [ 466.552941] x5 : ffffffd08c4100d0 x4 : ffffffafadfb0000 x3 : ffffffc080003f70<br /> [ 466.560102] x2 : ffffffc0829e8058 x1 : 0000000000000001 x0 : 0000000000000000<br /> [ 466.567263] Call trace:<br /> [ 466.569711] v3d_irq+0x118/0x2e0 [v3d] (P)<br /> [ 466.<br /> ---truncated---

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:5.15.177:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.1.127:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.6.74:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.12.11:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:-:*:*:*:*:*:*