cbcvebase.
CVE-2024-49998
published 2024-10-21

CVE-2024-49998: In the Linux kernel, the following vulnerability has been resolved: net: dsa: improve shutdown sequence Alexander Sverdlin presents 2 problems during shutdown…

PriorityP421medium4.7CVSS 3.1
AVLACHPRLUINSUCNINAH
EPSS
0.17%
7.0th percentile
In the Linux kernel, the following vulnerability has been resolved: net: dsa: improve shutdown sequence Alexander Sverdlin presents 2 problems during shutdown with the lan9303 driver. One is specific to lan9303 and the other just happens to reproduce there. The first problem is that lan9303 is unique among DSA drivers in that it calls dev_get_drvdata() at "arbitrary runtime" (not probe, not shutdown, not remove): phy_state_machine() -> ... -> dsa_user_phy_read() -> ds->ops->phy_read() -> lan9303_phy_read() -> chip->ops->phy_read() -> lan9303_mdio_phy_read() -> dev_get_drvdata() But we never stop the phy_state_machine(), so it may continue to run after dsa_switch_shutdown(). Our common pattern in all DSA drivers is to set drvdata to NULL to suppress the remove() method that may come afterwards. But in this case it will result in an NPD. The second problem is that the way in which we set dp->conduit->dsa_ptr = NULL; is concurrent with receive packet processing. dsa_switch_rcv() checks once whether dev->dsa_ptr is NULL, but afterwards, rather than continuing to use that non-NULL value, dev->dsa_ptr is dereferenced again and again without NULL checks: dsa_conduit_find_user() and many other places. In between dereferences, there is no locking to ensure that what was valid once continues to be valid. Both problems have the common aspect that closing the conduit interface solves them. In the first case, dev_close(conduit) triggers the NETDEV_GOING_DOWN event in dsa_user_netdevice_event() which closes user ports as well. dsa_port_disable_rt() calls phylink_stop(), which synchronously stops the phylink state machine, and ds->ops->phy_read() will thus no longer call into the driver after this point. In the second case, dev_close(conduit) should do this, as per Documentation/networking/driver.rst: | Quiescence | ---------- | | After the ndo_stop routine has been called, the hardware must | not receive or transmit any data. All in flight packets must | be aborted. If

Affected

27 ranges· showing 25
VendorProductVersion rangeFixed in
debianlinux< linux 6.11.4-1 (forky)linux 6.11.4-1 (forky)
linuxlinux
linuxlinux
linuxlinux>= 5.15.155 < 5.15.1765.15.176
linuxlinux>= 5.16.10 < 5.175.17
linuxlinux>= ee534378f00561207656663d93907583958339ae < ab9e90619b6339becc5415647ae154a9a46a044dab9e90619b6339becc5415647ae154a9a46a044d
linuxlinux>= ee534378f00561207656663d93907583958339ae < 2e93bf719462ac6d23c881c8b93e5dc9bf5ab7f52e93bf719462ac6d23c881c8b93e5dc9bf5ab7f5
linuxlinux>= ee534378f00561207656663d93907583958339ae < ab5d3420a1120950703dbdc33698b28a6ebc3d23ab5d3420a1120950703dbdc33698b28a6ebc3d23
linuxlinux>= ee534378f00561207656663d93907583958339ae < b4a65d479213fe84ecb14e328271251eebe69492b4a65d479213fe84ecb14e328271251eebe69492
linuxlinux>= ee534378f00561207656663d93907583958339ae < 6c24a03a61a245fe34d47582898331fa034b6ccd6c24a03a61a245fe34d47582898331fa034b6ccd
linuxlinux>= ff45899e732e57088985e3a497b1d9100571c0f5 < 87bd909a7014e32790e8c759d5b7694a95778ca587bd909a7014e32790e8c759d5b7694a95778ca5
linuxlinux_kernel
linuxlinux_kernel>= 0 < 6.11.4-16.11.4-1
linuxlinux_kernel>= 0 < 6.11.4-16.11.4-1
linuxlinux_kernel>= 0 < 5.15.0-135.1465.15.0-135.146
linuxlinux_kernel>= 0 < 6.8.0-54.566.8.0-54.56
linuxlinux_kernel>= 0 < 6.11.0-18.186.11.0-18.18
linuxlinux_kernel>= 5.15.155 < 5.165.16
linuxlinux_kernel>= 5.16.10 < 5.175.17
linuxlinux_kernel>= 5.17 < 6.10.146.10.14
linuxlinux_kernel>= 6.11 < 6.11.36.11.3
msrcazl3_kernel_6.6.104.2-4_on_azure_linux_3.0
msrcazl3_kernel_6.6.112.1-2_on_azure_linux_3.0
msrcazl3_kernel_6.6.96.2-1_on_azure_linux_3.0
msrcazl3_kernel_6.6.96.2-2_on_azure_linux_3.0

CVSS provenance

nvdv3.14.7MEDIUMCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
osv8.8HIGH
vendor_ubuntu8.8HIGH
vendor_debian4.7MEDIUM
vendor_msrc4.7MEDIUM
vendor_redhat4.7MEDIUM
Stop checking back — get the weekly exploitation signal.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.