Bug 2379207 (CVE-2025-38274) - CVE-2025-38274 kernel: fpga: fix potential null pointer deref in fpga_mgr_test_img_load_sgt()
Summary: CVE-2025-38274 kernel: fpga: fix potential null pointer deref in fpga_mgr_tes...
Keywords:
Status: NEW
Alias: CVE-2025-38274
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-07-10 08:03 UTC by OSIDB Bzimport
Modified: 2025-07-11 08:30 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-07-10 08:03:34 UTC
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().

Comment 1 Avinash Hanwate 2025-07-11 08:27:35 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025071008-CVE-2025-38274-087f@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.