Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2024-49998 — kernel

🟡 CVSS 4.7 — Medium ✅ No Known Exploit NVD
4.7
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

net: dsa: improve shutdown sequence

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 necessary, poll or wait for completion of

| any reset commands.

So it should be sufficient to ensure that later, when we zeroize

conduit->dsa_ptr, there will be no concurrent dsa_switch_rcv() call

on this conduit.

The addition of the netif_device_detach() function is to ensure that

ioctls, rtnetlinks and ethtool requests on the user ports no longer

propagate down to the driver - we're no longer prepared to handle them.

The race condition actually did not exist when commit 0650bf52b31f

("net: dsa: be compatible with masters which unregister on shutdown")

first introduced dsa_switch_shutdown(). It was created later, when we

stopped unregistering the user interfaces from a bad spot, and we just

replaced that sequence with a racy zeroization of conduit->dsa_ptr

(one which doesn't ensure that the interfaces aren't up).

How this vulnerability can be exploited

This issue can be reached with local access to the system, attack complexity is high, an attacker needs low-level privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality none, integrity none, availability high.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H

  • Attack vector: Local — a local account, shell or session on the host is needed.
  • Attack complexity: High — the attacker first has to win a race, learn a secret or otherwise prepare the target.
  • Privileges required: Low — an ordinary user account is enough.
  • User interaction: None — nobody has to be tricked into anything.
  • Scope: Unchanged — the damage stays inside the vulnerable component.
  • Confidentiality impact: None.
  • Integrity impact: None.
  • Availability impact: High — total loss, or loss the attacker controls.

Affected software

CVE-2024-49998 is recorded against 2 packages.

  • kernel (from 6.7.0 up to 6.11.3)
  • linux-kernel

Timeline and source

Published on 21 October 2024 and last revised on 12 August 2026. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from NVD.

References

cert-portal.siemens.com (Web)
cert-portal.siemens.com (Web)
git.kernel.org (Web)
git.kernel.org (Web)
git.kernel.org (Web)
git.kernel.org (Web)
git.kernel.org (Web)
git.kernel.org (Web)
github.com (Advisory)
nvd.nist.gov (Advisory)
git.kernel.org (Package)

Other advisories for this package

kernel has other advisories on record. If you are patching this one, these are worth checking on the same host:

CVE-2024-49998 on other distributions

Each distribution ships its own build and its own fixed version. Pick the one you run:

Details

Severity Medium
CVSS Score 4.7
CVSS Vector CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
CWE N/A
Public Exploit ✅ No
Source NVD
Published 2024-10-21
Updated 2026-08-20
Modified 2026-08-12

Affected Packages

Software From version Fixed in
kernel 6.7.0 6.11.3
linux-kernel — —

References

Similar Threats

Vulnerability Monitoring

Track new vulnerabilities in kernel

CVE-2024-49998 is rated CVSS 4.7 Medium. BotEraser monitors your WordPress installation and notifies you when software you use appears in our vulnerability database.

Set Up Free Alerts →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2024
✓