CVE-2025-38274 Details
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().
A null pointer dereference vulnerability has been identified in the Linux kernel's FPGA manager. The issue arises in the function 'fpga_mgr_test_img_load_sgt()', which allocates memory for a scatter-gather table using 'kunit_kzalloc()'. However, the function does not verify whether the allocation was successful. It then passes the scatter-gather table to 'sg_alloc_table()', which forwards it to '__sg_alloc_table()'. This latter function attempts to clear the table by using 'memset()'. If the memory allocation fails, the scatter-gather table will be NULL, leading to a null pointer dereference when 'memset()' is called. The vulnerability has been addressed by adding a check for the allocation using 'KUNIT_ASSERT_NOT_ERR_OR_NULL()'.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
No SSVC data is available for this CVE.
References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://git.kernel.org/stable/c/6ebf1982038af12f3588417e4fd0417d2551da28 | kernel.org | Patch |
| https://git.kernel.org/stable/c/8b2230ac7ff0aeb2441132df638a82ab124f8624 | kernel.org | Patch |
| https://git.kernel.org/stable/c/e69e2cfd8b38d9463a250e153ef4963a604d61e9 | kernel.org | Patch |
| https://git.kernel.org/stable/c/eb4c74eaa6e2d15f3bbd32941c9d2a25b29a718d | kernel.org | Patch |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-476 | NULL Pointer Dereference | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| linux linux kernel | >= 6.6, < 6.6.94 >= 6.7, < 6.12.34 >= 6.13, < 6.15.3 |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | kernel.org |
| Nov 20, 2025 | Initial Analysis | [email protected] |
| Jul 10, 2025 | New CVE Received | kernel.org |