CVE-2026-99946: tpm: tpm_nsc: stop using the cleanup callback as dev.release
In the Linux kernel, the following vulnerability has been resolved:
tpm: tpmnsc: stop using the cleanup callback as dev.release
tpmnscremove() is called explicitly from cleanupnsc() and also runs as the platform device release callback on the final platformdeviceput(), so the cleanup executes twice on module exit; the second invocation operates on a chip that has already been freed by the devm cleanup, and the I/O region is released twice.
Overwriting the release callback installed by platformdevicealloc() also keeps platformdevicerelease() from running, leaking the platform object allocation.
Leave the default release callback in place; the explicit call in cleanupnsc() remains the single cleanup point.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In tpm_nsc, leave the default release callback in place; do not use the cleanup callback as dev.release, since cleanup_nsc() already calls tpm_nsc_remove() explicitly.