CVE-2022-48720: net: macsec: Fix offload support for NETDEV_UNREGISTER event
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
net: macsec: Fix offload support for NETDEV_UNREGISTER event
Current macsec netdev notify handler handles NETDEV_UNREGISTER event by releasing relevant SW resources only, this causes resources leak in case of macsec HW offload, as the underlay driver was not notified to clean it's macsec offload resources.
Fix by calling the underlay driver to clean it's relevant resources by moving offload handling from macsec_dellink() to macsec_common_dellink() when handling NETDEV_UNREGISTER event.
The Linux kernel CVE team has assigned CVE-2022-48720 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.6 with commit 3cf3227a21d1 and fixed in 5.10.99 with commit 2e7f5b6ee1a7 Issue introduced in 5.6 with commit 3cf3227a21d1 and fixed in 5.15.22 with commit e7a0b3a0806d Issue introduced in 5.6 with commit 3cf3227a21d1 and fixed in 5.16.8 with commit 8299be160aad Issue introduced in 5.6 with commit 3cf3227a21d1 and fixed in 5.17 with commit 9cef24c8b76c
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2022-48720
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/net/macsec.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/2e7f5b6ee1a7a2c628253a95b0a95b582901ef1b https://git.kernel.org/stable/c/e7a0b3a0806dae3cc81931f0e83055ca2ac6f455 https://git.kernel.org/stable/c/8299be160aad8548071d080518712dec0df92bd5 https://git.kernel.org/stable/c/9cef24c8b76c1f6effe499d2f131807c90f7ce9a