Vulnerability record
tpm: tpm_nsc: stop using the cleanup callback as dev.release
In the Linux kernel, the following vulnerability has been resolved:
tpm: tpm_nsc: stop using the cleanup callback as dev.release
tpm_nsc_remove() is called explicitly from cleanup_nsc() and also runs as the platform device release callback on the final platform_device_put(), 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 platform_device_alloc() also keeps platform_device_release() from running, leaking the platform…
Remediation
No fixed version has been published for this vulnerability yet. Check the references below for vendor advisories, workarounds and mitigation guidance.
Sources