CVE-2026-142802: platform/x86/amd: hfi: Fix a use-after-free when unloading the driver

Published Dec 3, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

platform/x86/amd: hfi: Fix a use-after-free when unloading the driver

amdhfiprobe() registers CPU hotplug callbacks with cpuhpsetupstate(CPUHPAPONLINEDYN, ...) and schedules the static schedamdhfiitmtwork work item, but amdhfiremove() tears down neither. The dynamically assigned hotplug state returned by cpuhpsetupstate() is discarded, so cpuhpremovestate() can never be called, and the pending work is never cancelled.

After the module is unloaded and its memory is freed, any subsequent CPU hotplug event or execution of the scheduled work dereferences the stale callback and work function pointers, resulting in a use-after-free and kernel panic.

Store the hotplug state returned by cpuhpsetupstate() and, on removal, call cpuhpremovestate() to unregister the callbacks and cancelworksync() to flush the scheduled work before the module memory goes away.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    Store the hotplug state returned by cpuhp_setup_state() in amd_hfi_probe(); in amd_hfi_remove(), call cpuhp_remove_state() with that state to unregister the callbacks and call cancel_work_sync() to flush the scheduled work before the module memory is freed.

Event History

Dec 3, 2026
CVE Published
via MITRE·03:11 AM
Data Sourced
via MITRE·03:11 AM
Description

Frequently Asked Questions

1

When can this issue be triggered?

It can be triggered after the AMD HFI driver is unloaded, if a CPU hotplug event occurs or the previously scheduled AMD HFI work item executes. Those paths can call function pointers in memory that was freed during module unload.

2

What is the likely impact?

The described outcome is a kernel use-after-free leading to a kernel panic. The issue affects systems where the AMD HFI driver has been loaded and is then unloaded while its hotplug callbacks or scheduled work remain active.

3

How is the issue fixed?

The fix retains the dynamically assigned CPU hotplug state so it can be removed during driver teardown. It also unregisters the hotplug callbacks with cpuhp_remove_state() and uses cancel_work_sync() to flush pending work before the module memory is freed.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203