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 _sgalloc_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 KUNITASSERTNOTERROR_NULL().
[
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"18031495841490953384553454310408673340",
"295011478531809656078033945991946336228",
"327681738479117598357619717903877695309",
"207864117830350977762897239450581477387"
]
},
"id": "CVE-2025-38274-4606f1bf",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6ebf1982038af12f3588417e4fd0417d2551da28",
"target": {
"file": "drivers/fpga/tests/fpga-mgr-test.c"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"18031495841490953384553454310408673340",
"295011478531809656078033945991946336228",
"327681738479117598357619717903877695309",
"207864117830350977762897239450581477387"
]
},
"id": "CVE-2025-38274-541cdd07",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e69e2cfd8b38d9463a250e153ef4963a604d61e9",
"target": {
"file": "drivers/fpga/tests/fpga-mgr-test.c"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 1273.0,
"function_hash": "35395324952240619276108249855916343123"
},
"id": "CVE-2025-38274-9683f180",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6ebf1982038af12f3588417e4fd0417d2551da28",
"target": {
"file": "drivers/fpga/tests/fpga-mgr-test.c",
"function": "fpga_mgr_test_img_load_sgt"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"18031495841490953384553454310408673340",
"295011478531809656078033945991946336228",
"327681738479117598357619717903877695309",
"207864117830350977762897239450581477387"
]
},
"id": "CVE-2025-38274-98419ed8",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8b2230ac7ff0aeb2441132df638a82ab124f8624",
"target": {
"file": "drivers/fpga/tests/fpga-mgr-test.c"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 1223.0,
"function_hash": "72936890926280223364806926214808848811"
},
"id": "CVE-2025-38274-9d0ea05d",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e69e2cfd8b38d9463a250e153ef4963a604d61e9",
"target": {
"file": "drivers/fpga/tests/fpga-mgr-test.c",
"function": "fpga_mgr_test_img_load_sgt"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 1273.0,
"function_hash": "35395324952240619276108249855916343123"
},
"id": "CVE-2025-38274-b6fda007",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8b2230ac7ff0aeb2441132df638a82ab124f8624",
"target": {
"file": "drivers/fpga/tests/fpga-mgr-test.c",
"function": "fpga_mgr_test_img_load_sgt"
}
}
]