CVE-2025-38274

MEDIUM

Linux Kernel - Null Pointer Dereference in fpga_mgr_test_img_load_sgt()

Title source: llm
STIX 2.1

Description

In the Linux kernel, the following vulnerability has been resolved: fpga: fix potential null pointer deref in fpga_mgr_test_img_load_sgt() fpga_mgr_test_img_load_sgt() allocates memory for sgt using kunit_kzalloc() however it does not check if the allocation failed. It then passes sgt to sg_alloc_table(), which passes it to __sg_alloc_table(). This function calls memset() on sgt in an attempt to zero it out. If the allocation fails then sgt will be NULL and the memset will trigger a NULL pointer dereference. Fix this by checking the allocation with KUNIT_ASSERT_NOT_ERR_OR_NULL().

Scores

CVSS v3 5.5
EPSS 0.0015
EPSS Percentile 5.0%
Attack Vector LOCAL
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Details

CWE
CWE-476
Status published
Products (14)
linux/Kernel 6.13.0 - 6.15.3linux
linux/Kernel 6.6.0 - 6.6.94linux
linux/Kernel 6.7.0 - 6.12.34linux
Linux/Linux < 6.6
Linux/Linux 6.12.34 - 6.12.*
Linux/Linux 6.15.3 - 6.15.*
Linux/Linux 6.16
Linux/Linux 6.6
Linux/Linux 6.6.94 - 6.6.*
Linux/Linux ccbc1c302115d8125d6a96296ba52702c6de0ade - 6ebf1982038af12f3588417e4fd0417d2551da28
... and 4 more
Published Jul 10, 2025
Tracked Since Feb 18, 2026