{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2025-38596",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-04-16T04:51:24.028Z",
        "datePublished": "2025-08-19T17:03:26.445Z",
        "dateUpdated": "2026-08-05T12:03:18.312Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T12:03:18.312Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/panthor: Fix UAF in panthor_gem_create_with_handle() debugfs code\n\nThe object is potentially already gone after the drm_gem_object_put().\nIn general the object should be fully constructed before calling\ndrm_gem_handle_create(), except the debugfs tracking uses a separate\nlock and list and separate flag to denotate whether the object is\nactually initialized.\n\nSince I'm touching this all anyway simplify this by only adding the\nobject to the debugfs when it's ready for that, which allows us to\ndelete that separate flag. panthor_gem_debugfs_bo_rm() already checks\nwhether we've actually been added to the list or this is some error\npath cleanup.\n\nv2: Fix build issues for !CONFIG_DEBUGFS (Adrián)\n\nv3: Add linebreak and remove outdated comment (Liviu)"
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 7.8,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - The bug is reached through the PANTHOR_BO_CREATE ioctl (plus a concurrent GEM_CLOSE) on the local DRM render device node /dev/dri/renderD*, which requires local system access rather than any network path.\nAC:L - Exploitation is a race between BO_CREATE and GEM_CLOSE that the attacker fully controls from two threads on the same fd, and DRM handle numbers are predictable via the idr allocator, so the window can be won reliably.\nPR:L - The BO_CREATE ioctl is DRM_RENDER_ALLOW, reachable by any unprivileged local user able to open the Panthor render node (render/graphics group on Android/embedded/desktop); no root or capability is needed.\nUI:N - The attacker triggers the ioctl race entirely on its own; no action by any other user is required.\nS:U - The use-after-free corrupts kernel heap within the same kernel security authority, with no crossing of a VM, IOMMU, or sandbox boundary.\nC:H - A use-after-free lets the attacker reallocate the freed object slot with attacker-influenced or security-relevant data, which per kernel UAF guidance is treated as enabling arbitrary/high-impact information disclosure.\nI:H - The stale bo->debugfs.flags write corrupts freed heap memory that can be reallocated to another structure, giving a controlled-timing UAF write primitive leveragable for arbitrary write / control-flow hijack.\nA:H - Writing to freed memory reliably corrupts the kernel heap and causes oops/panic, a high availability impact typical of any use-after-free."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/gpu/drm/panthor/panthor_gem.c",
                        "drivers/gpu/drm/panthor/panthor_gem.h"
                    ],
                    "versions": [
                        {
                            "version": "a3707f53eb3f4f3e7a30d720be0885f813d649bb",
                            "lessThan": "5f2be12442db6a2904e6e31b0e3b5ad5aebf868b",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "a3707f53eb3f4f3e7a30d720be0885f813d649bb",
                            "lessThan": "fe69a391808404977b1f002a6e7447de3de7a88e",
                            "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/gpu/drm/panthor/panthor_gem.c",
                        "drivers/gpu/drm/panthor/panthor_gem.h"
                    ],
                    "versions": [
                        {
                            "version": "6.16",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.16",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.16.1",
                            "lessThanOrEqual": "6.16.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.17",
                            "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.16",
                                    "versionEndExcluding": "6.16.1"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.16",
                                    "versionEndExcluding": "6.17"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/5f2be12442db6a2904e6e31b0e3b5ad5aebf868b"
                },
                {
                    "url": "https://git.kernel.org/stable/c/fe69a391808404977b1f002a6e7447de3de7a88e"
                }
            ],
            "title": "drm/panthor: Fix UAF in panthor_gem_create_with_handle() debugfs code",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}