drm/amdgpu: fix IP instance memory leak on kobject add failure
In the Linux kernel, the following vulnerability has been resolved: drm/amdgpu: fix IP instance memory leak on kobject add failure amdgpu_discovery_sysfs_ips() allocates ip_hw_instance with kzalloc_flex() and initializes its embedded kobject before calling kobject_add(). If kobject_add() fails, the return value is ignored and execution continues without dropping the initial kobject reference. The failed kobject is not retained in the kset list, so the normal sysfs teardown path cannot find it. As a result, ip_hw_instance_release() is never called and the ip_hw_instance allocation is leaked. Call kobject_put() when kobject_add() fails so the initial reference is dropped and ip_hw_instance_release() can free the allocation. Keep the existing best-effort sysfs behavior by continuing with the remaining IP entries after the failed registration. The issue was identified by a static analysis tool I developed and confirmed by manual review. (cherry picked from commit 5c75fbcca8af1096d8d9415b91d8ea6212c22ee1)
CVE-2026-98780
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: cve:CVE-2026-98780
Linux
Source reference: /containers/cna/affected/0/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Linux
Source reference: /containers/cna/affected/1/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "a6c40b178092f41b9d6cc8615697c14b1e5a1c3a",
"lessThan": "f6364e7284a131556f5d763d867147bece2843a8",
"versionType": "git"
},
{
"status": "affected",
"version": "a6c40b178092f41b9d6cc8615697c14b1e5a1c3a",
"lessThan": "0563b26c1437fe7e25ea42c334eb85c0a703f8ff",
"versionType": "git"
},
{
"status": "affected",
"version": "a6c40b178092f41b9d6cc8615697c14b1e5a1c3a",
"lessThan": "7ca44cb14d0249992a8f1425ba004d6e2d16d255",
"versionType": "git"
},
{
"status": "affected",
"version": "a6c40b178092f41b9d6cc8615697c14b1e5a1c3a",
"lessThan": "c05bbcc263d67b8b158e2a52be7e3005895969d1",
"versionType": "git"
},
{
"status": "affected",
"version": "a6c40b178092f41b9d6cc8615697c14b1e5a1c3a",
"lessThan": "f5a5add3605935163dd0f75749b6a7869e9765af",
"versionType": "git"
}
],
"programFiles": [
"drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c"
],
"defaultStatus": "unaffected"
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "5.18"
},
{
"status": "unaffected",
"version": "0",
"lessThan": "5.18",
"versionType": "semver"
},
{
"status": "unaffected",
"version": "6.6.160",
"versionType": "semver",
"lessThanOrEqual": "6.6.*"
},
{
"status": "unaffected",
"version": "6.12.113",
"versionType": "semver",
"lessThanOrEqual": "6.12.*"
},
{
"status": "unaffected",
"version": "6.18.56",
"versionType": "semver",
"lessThanOrEqual": "6.18.*"
},
{
"status": "unaffected",
"version": "7.2.10",
"versionType": "semver",
"lessThanOrEqual": "7.2.*"
},
{
"status": "unaffected",
"version": "7.3",
"versionType": "original_commit_for_fix",
"lessThanOrEqual": "*"
}
],
"programFiles": [
"drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c"
],
"defaultStatus": "affected"
}
]- Related CVEs
- CVE-2026-98780
Source reference:
/cveMetadata/cveId
Publisher severity
No explicit severity was provided.
- Event
- #48973 · Revision 1
- Added to Heist Feed
- Publisher date