CVE-2025-38274

Source
https://cve.org/CVERecord?id=CVE-2025-38274
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-38274.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-38274
Downstream
Related
Published
2025-07-10T07:41:55.041Z
Modified
2026-03-12T02:15:26.377579Z
Summary
fpga: fix potential null pointer deref in fpga_mgr_test_img_load_sgt()
Details

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

fpga: fix potential null pointer deref in fpgamgrtestimgload_sgt()

fpgamgrtestimgloadsgt() allocates memory for sgt using kunitkzalloc() however it does not check if the allocation failed. It then passes sgt to sgalloctable(), which passes it to __sgalloctable(). 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 KUNITASSERTNOTERROR_NULL().

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38274.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
ccbc1c302115d8125d6a96296ba52702c6de0ade
Fixed
e69e2cfd8b38d9463a250e153ef4963a604d61e9
Fixed
8b2230ac7ff0aeb2441132df638a82ab124f8624
Fixed
eb4c74eaa6e2d15f3bbd32941c9d2a25b29a718d
Fixed
6ebf1982038af12f3588417e4fd0417d2551da28

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-38274.json"