HomeDefectsLIN1025-2033
Acknowledged

LIN1025-2033 : Security Advisory - linux - CVE-2022-50220

Created: Jun 18, 2025    Updated: Sep 4, 2026
Resolved Date: Jun 19, 2025
Found In Version: 10.25.33.1
Severity: Standard
Applicable for: Wind River Linux LTS 25
Component/s: Kernel

Description

In the Linux kernel, the following vulnerability has been resolved:EOL][EOL]usbnet: Fix linkwatch use-after-free on disconnect[EOL][EOL]usbnet uses the work usbnet_deferred_kevent() to perform tasks which may[EOL]sleep.  On disconnect, completion of the work was originally awaited in[EOL]->ndo_stop().  But in 2003, that was moved to ->disconnect() by historic[EOL]commit "[PATCH] USB: usbnet, prevent exotic rtnl deadlock":[EOL][EOL]  https://git.kernel.org/tglx/history/c/0f138bbfd83c[EOL][EOL]The change was made because back then, the kernel's workqueue[EOL]implementation did not allow waiting for a single work.  One had to wait[EOL]for completion of *all* work by calling flush_scheduled_work(), and that[EOL]could deadlock when waiting for usbnet_deferred_kevent() with rtnl_mutex[EOL]held in ->ndo_stop().[EOL][EOL]The commit solved one problem but created another:  It causes a[EOL]use-after-free in USB Ethernet drivers aqc111.c, asix_devices.c,[EOL]ax88179_178a.c, ch9200.c and smsc75xx.c:[EOL][EOL]* If the drivers receive a link change interrupt immediately before[EOL]  disconnect, they raise EVENT_LINK_RESET in their (non-sleepable)[EOL]  ->status() callback and schedule usbnet_deferred_kevent().[EOL]* usbnet_deferred_kevent() invokes the driver's ->link_reset() callback,[EOL]  which calls netif_carrier_{on,off}().[EOL]* That in turn schedules the work linkwatch_event().[EOL][EOL]Because usbnet_deferred_kevent() is awaited after unregister_netdev(),[EOL]netif_carrier_{on,off}() may operate on an unregistered netdev and[EOL]linkwatch_event() may run after free_netdev(), causing a use-after-free.[EOL][EOL]In 2010, usbnet was changed to only wait for a single instance of[EOL]usbnet_deferred_kevent() instead of *all* work by commit 23f333a2bfaf[EOL]("drivers/net: don't use flush_scheduled_work()").[EOL][EOL]Unfortunately the commit neglected to move the wait back to[EOL]->ndo_stop().  Rectify that omission at long last.

CREATE(Triage):(User=lchen-cn) [CVE-2022-50220 (https://nvd.nist.gov/vuln/detail/CVE-2022-50220)