net: ibm: emac: mal: fix potential system hang in mal_remove()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ b3e441c6ed8655a42e7b4da1b6dc7939f259d9c9 · < c4cb9a728df66c46067b26263f5beb633aae4087| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: ibm: emac: mal: fix potential system hang in mal_remove()
napi_disable() is not idempotent and calling it on an already-disabled or unenabled NAPI context will cause the kernel to spin indefinitely waiting for the NAPI_STATE_SCHED bit to clear.
In mal_remove(), napi_disable() is called unconditionally. If no MACs were registered, NAPI was never enabled. Also, if they were registered but subsequently unregistered, NAPI was already disabled in mal_unregister_commac(). In either case, calling napi_disable() causes the kernel to hang upon module removal.
Fix this by only calling napi_disable() in mal_remove() if the commac list is not empty (which implies NAPI is enabled).
From the CVE record · Linux
The Linux kernel's IBM EMAC MAL removal path can hang the system by disabling a NAPI context that is already disabled or was never enabled. This occurs during module removal if no MACs were registered or if registered MACs were subsequently unregistered. The input does not specify an attacker path, authentication requirement, or user-interaction requirement.
Engineers running the Linux kernel with IBM EMAC MAL should check their kernel versions against the vendor advisory; affected versions are not specified.