{"id":"CVE-2025-38274","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:\n\nfpga: fix potential null pointer deref in fpga_mgr_test_img_load_sgt()\n\nfpga_mgr_test_img_load_sgt() allocates memory for sgt using\nkunit_kzalloc() however it does not check if the allocation failed.\nIt then passes sgt to sg_alloc_table(), which passes it to\n__sg_alloc_table(). This function calls memset() on sgt in an attempt to\nzero it out. If the allocation fails then sgt will be NULL and the\nmemset will trigger a NULL pointer dereference.\n\nFix this by checking the allocation with KUNIT_ASSERT_NOT_ERR_OR_NULL().","modified":"2026-04-16T00:03:29.156636370Z","published":"2025-07-10T07:41:55.041Z","related":["SUSE-SU-2025:21074-1","SUSE-SU-2025:21139-1","SUSE-SU-2025:21179-1","openSUSE-SU-2025:20081-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38274.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/6ebf1982038af12f3588417e4fd0417d2551da28"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8b2230ac7ff0aeb2441132df638a82ab124f8624"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e69e2cfd8b38d9463a250e153ef4963a604d61e9"},{"type":"WEB","url":"https://git.kernel.org/stable/c/eb4c74eaa6e2d15f3bbd32941c9d2a25b29a718d"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38274.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38274"},{"type":"PACKAGE","url":"https://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"}}],"schema_version":"1.7.5"}