{"id":"CVE-2025-38274","aliases":["CVE-2025-38274"],"related":[],"kind":"vulnerability","state":"published","title":"fpga: fix potential null pointer deref in fpga_mgr_test_img_load_sgt()","summary":"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().","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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().","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: fpga: se corrige una posible desreferencia de puntero nulo en fpga_mgr_test_img_load_sgt(). fpga_mgr_test_img_load_sgt() asigna memoria para sgt mediante kunit_kzalloc(), pero no comprueba si la asignación ha fallado. A continuación, pasa sgt a sg_alloc_table(), que a su vez la pasa a __sg_alloc_table(). Esta función llama a memset() en sgt para intentar ponerlo a cero. Si la asignación falla, sgt será nulo y memset activará una desreferencia de puntero nulo. Solucione esto comprobando la asignación con KUNIT_ASSERT_NOT_ERR_OR_NULL().","source":"nvd"}],"published":"2025-07-10T07:41:55.041Z","modified":"2026-06-17T09:16:31.730Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-476"],"affected":[{"ranges":[{"type":"git","introduced":"ccbc1c302115d8125d6a96296ba52702c6de0ade","fixed":"e69e2cfd8b38d9463a250e153ef4963a604d61e9","status":"affected"},{"type":"git","introduced":"ccbc1c302115d8125d6a96296ba52702c6de0ade","fixed":"8b2230ac7ff0aeb2441132df638a82ab124f8624","status":"affected"},{"type":"git","introduced":"ccbc1c302115d8125d6a96296ba52702c6de0ade","fixed":"eb4c74eaa6e2d15f3bbd32941c9d2a25b29a718d","status":"affected"},{"type":"git","introduced":"ccbc1c302115d8125d6a96296ba52702c6de0ade","fixed":"6ebf1982038af12f3588417e4fd0417d2551da28","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.6","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.6","status":"unaffected"},{"type":"semver","introduced":"6.6.94","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.34","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.15.3","lastAffected":"6.15.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.16","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.6","fixed":"6.6.94"},{"status":"affected","introduced":"6.7","fixed":"6.12.34"},{"status":"affected","introduced":"6.13","fixed":"6.15.3"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/e69e2cfd8b38d9463a250e153ef4963a604d61e9","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8b2230ac7ff0aeb2441132df638a82ab124f8624","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/eb4c74eaa6e2d15f3bbd32941c9d2a25b29a718d","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6ebf1982038af12f3588417e4fd0417d2551da28","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-38274","url":"https://www.cve.org/CVERecord?id=CVE-2025-38274","licence":"CVE Terms of Use","modified":"2026-05-11T21:24:42.305Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-38274","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38274","licence":"Public domain","modified":"2026-06-17T09:16:31.730Z"}],"updatedAt":"2026-11-25T22:59:01.049Z","epss":{"score":0.00194,"percentile":0.09602,"date":"2026-12-01T12:00:22.000Z"}}