CVE-2025-38274

fpga: fix potential null pointer deref in fpga_mgr_test_img_load_sgt()

MEDIUM
5.5
CVSS Score
Published: July 10, 2025 at 07:41 AM UTC
Updated: June 17, 2026 at 09:16 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%

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().

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

6.13 ≤ v < 6.15.36.6 ≤ v < 6.12.346.6 ≤ v < 6.15.36.6 ≤ v < 6.166.6 ≤ v < 6.6.946.7 ≤ v < 6.12.346.6ccbc1c302115d8125d6a96296ba52702c6de0ade
Vendor states this is fixed in 6ebf1982038af12f3588417e4fd0417d2551da28 (fixed)
Vendor states this is fixed in 8b2230ac7ff0aeb2441132df638a82ab124f8624 (fixed)
Vendor states this is fixed in e69e2cfd8b38d9463a250e153ef4963a604d61e9 (fixed)
Vendor states this is fixed in eb4c74eaa6e2d15f3bbd32941c9d2a25b29a718d (fixed)
Vendor states this is fixed in 6.12.34 (unaffected)
Vendor states this is fixed in 6.15.3 (unaffected)
Vendor states this is fixed in 6.16 (unaffected)
Vendor states this is fixed in 6.6 (unaffected)
Vendor states this is fixed in 6.6.94 (unaffected)

References (4)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/6ebf1982038af12f3588417e4fd0417d2551da28
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/8b2230ac7ff0aeb2441132df638a82ab124f8624
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/e69e2cfd8b38d9463a250e153ef4963a604d61e9
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/eb4c74eaa6e2d15f3bbd32941c9d2a25b29a718d

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-476

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card