{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2025-38274",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-04-16T04:51:23.998Z",
        "datePublished": "2025-07-10T07:41:55.041Z",
        "dateUpdated": "2026-05-11T21:24:42.305Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-05-11T21:24:42.305Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "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()."
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/fpga/tests/fpga-mgr-test.c"
                    ],
                    "versions": [
                        {
                            "version": "ccbc1c302115d8125d6a96296ba52702c6de0ade",
                            "lessThan": "e69e2cfd8b38d9463a250e153ef4963a604d61e9",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "ccbc1c302115d8125d6a96296ba52702c6de0ade",
                            "lessThan": "8b2230ac7ff0aeb2441132df638a82ab124f8624",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "ccbc1c302115d8125d6a96296ba52702c6de0ade",
                            "lessThan": "eb4c74eaa6e2d15f3bbd32941c9d2a25b29a718d",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "ccbc1c302115d8125d6a96296ba52702c6de0ade",
                            "lessThan": "6ebf1982038af12f3588417e4fd0417d2551da28",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/fpga/tests/fpga-mgr-test.c"
                    ],
                    "versions": [
                        {
                            "version": "6.6",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.6",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.94",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.34",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.15.3",
                            "lessThanOrEqual": "6.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.16",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.6",
                                    "versionEndExcluding": "6.6.94"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.6",
                                    "versionEndExcluding": "6.12.34"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.6",
                                    "versionEndExcluding": "6.15.3"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.6",
                                    "versionEndExcluding": "6.16"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/e69e2cfd8b38d9463a250e153ef4963a604d61e9"
                },
                {
                    "url": "https://git.kernel.org/stable/c/8b2230ac7ff0aeb2441132df638a82ab124f8624"
                },
                {
                    "url": "https://git.kernel.org/stable/c/eb4c74eaa6e2d15f3bbd32941c9d2a25b29a718d"
                },
                {
                    "url": "https://git.kernel.org/stable/c/6ebf1982038af12f3588417e4fd0417d2551da28"
                }
            ],
            "title": "fpga: fix potential null pointer deref in fpga_mgr_test_img_load_sgt()",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}