Linux: net: ibm: emac: mal: fix potential system hang in mal_remove()
What fixes it
- 9c1c814a662d9c81959eba591bb52b24639390f2LinuxCVE List
- 34c4cae51718d6f393415e01c61314c1bde02f2eLinuxCVE List
- 62126e73e230cf4bd6c27cf201949c4290af84a1LinuxCVE List
- 7c5d41f87f079990bf241359e3c1332d8d10fe87LinuxCVE List
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
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).
Text from CVE List
Affected versions 16
- Linuxaffected: b3e441c6ed8655a42e7b4da1b6dc7939f259d9c9 before 9c1c814a662d9c81959eba591bb52b24639390f2CVE List
- Linuxaffected: b3e441c6ed8655a42e7b4da1b6dc7939f259d9c9 before 34c4cae51718d6f393415e01c61314c1bde02f2eCVE List
- Linuxaffected: b3e441c6ed8655a42e7b4da1b6dc7939f259d9c9 before 62126e73e230cf4bd6c27cf201949c4290af84a1CVE List
- Linuxaffected: b3e441c6ed8655a42e7b4da1b6dc7939f259d9c9 before f0399b3e212741bc5a64b8399d6266c4a150bdfeCVE List
- Linuxaffected: b3e441c6ed8655a42e7b4da1b6dc7939f259d9c9 before f6c1aad9b35fa083f48ce0c5926204891d82e089CVE List
- Linuxaffected: b3e441c6ed8655a42e7b4da1b6dc7939f259d9c9 before c4cb9a728df66c46067b26263f5beb633aae4087CVE List
- Linuxaffected: b3e441c6ed8655a42e7b4da1b6dc7939f259d9c9 before 7c5d41f87f079990bf241359e3c1332d8d10fe87CVE List
- Linuxaffected: 2.6.24CVE List
- Linuxunaffected: all versions before 2.6.24CVE List
- Linuxunaffected: 5.10.271 through 5.10.*CVE List
- Linuxunaffected: 5.15.222 through 5.15.*CVE List
- Linuxunaffected: 6.1.189 through 6.1.*CVE List
- Linuxunaffected: 6.6.158 through 6.6.*CVE List
- Linuxunaffected: 6.12.111 through 6.12.*CVE List
- Linuxunaffected: 6.18.53 through 6.18.*CVE List
- Linuxunaffected: 7.2CVE List
References 7
- git.kernel.org/stable/c/9c1c814a662d9c81959eba591bb52b24639390f2Referencevia CVE List
- git.kernel.org/stable/c/34c4cae51718d6f393415e01c61314c1bde02f2eReferencevia CVE List
- git.kernel.org/stable/c/62126e73e230cf4bd6c27cf201949c4290af84a1Referencevia CVE List
- git.kernel.org/stable/c/f0399b3e212741bc5a64b8399d6266c4a150bdfeReferencevia CVE List
- git.kernel.org/stable/c/f6c1aad9b35fa083f48ce0c5926204891d82e089Referencevia CVE List
- git.kernel.org/stable/c/c4cb9a728df66c46067b26263f5beb633aae4087Referencevia CVE List
- git.kernel.org/stable/c/7c5d41f87f079990bf241359e3c1332d8d10fe87Referencevia CVE List