Skip to content
Heist/ feed
Back to feed
UnratedFix available

net: dsa: improve shutdown sequence

Type: advisorySources: OSV

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_ev

Products
Kernel
Affected versions
Not specified
Fixed versions
5.15.176, 6.1.167, 6.10.14, 6.11.3, 6.6.117
CVEs
CVE-2024-49998
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 08:15 UTC · Revision 1

Source evidence

net: dsa: improve shutdown sequence

core-osv · Original source

Published 21 Oct 2024, 18:02 UTC

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_ev

osv:CVE-2024-49998

Kernel

Fixed versions: 5.15.176, 6.1.167, 6.6.117, 6.10.14, 6.11.3

Complete source record
{
  "id": "82a7cadab0867d99ae184353fcff82345af21cac3b9c51b588072e530b5034ee",
  "url": "https://osv.dev/vulnerability/CVE-2024-49998",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "net: dsa: improve shutdown sequence",
    "summary": "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_ev",
    "evidence": "osv:CVE-2024-49998",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.15.176",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.167",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.117",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.10.14",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.11.3",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2024-49998",
      "aliases": [
        "CVE-2024-49998"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "ff45899e732e57088985e3a497b1d9100571c0f5"
                },
                {
                  "fixed": "87bd909a7014e32790e8c759d5b7694a95778ca5"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "ee534378f00561207656663d93907583958339ae"
                },
                {
                  "fixed": "ab9e90619b6339becc5415647ae154a9a46a044d"
                },
                {
                  "fixed": "2e93bf719462ac6d23c881c8b93e5dc9bf5ab7f5"
                },
                {
                  "fixed": "ab5d3420a1120950703dbdc33698b28a6ebc3d23"
                },
                {
                  "fixed": "b4a65d479213fe84ecb14e328271251eebe69492"
                },
                {
                  "fixed": "6c24a03a61a245fe34d47582898331fa034b6ccd"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5.15.155"
                },
                {
                  "fixed": "5.15.176"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5.16.10"
                },
                {
                  "fixed": "5.17"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "89b60402d43cdab4387dbbf24afebda5cf092ae7"
                }
              ]
            }
          ],
          "versions": [
            "v5.15.175",
            "v5.15.174",
            "v5.15.173",
            "v5.15.172",
            "v5.15.171",
            "v5.15.170",
            "v5.15.169",
            "v5.15.168",
            "v5.15.167",
            "v5.15.166",
            "v5.15.165",
            "v5.15.164",
            "v5.15.163",
            "v5.15.162",
            "v5.15.161",
            "v5.15.160",
            "v5.15.159",
            "v5.15.158",
            "v5.15.157",
            "v5.15.156",
            "v5.15.155",
            "v5.16.20",
            "v5.16.19",
            "v5.16.18",
            "v5.16.17",
            "v5.16.16",
            "v5.16.15",
            "v5.16.14",
            "v5.16.13",
            "v5.16.12",
            "v5.16.11",
            "v5.16.10"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-49998.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "5.15.176"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.167"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.17.0"
                },
                {
                  "fixed": "6.6.117"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.10.14"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.11.3"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-49998.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:27.087198227Z",
      "provider": "osv",
      "references": [
        "https://cert-portal.siemens.com/productcert/html/ssa-019113.html",
        "https://cert-portal.siemens.com/productcert/html/ssa-082556.html",
        "https://cert-portal.siemens.com/productcert/html/ssa-457936.html",
        "https://cert-portal.siemens.com/productcert/html/ssa-784472.html",
        "https://git.kernel.org/stable/c/2e93bf719462ac6d23c881c8b93e5dc9bf5ab7f5",
        "https://git.kernel.org/stable/c/6c24a03a61a245fe34d47582898331fa034b6ccd",
        "https://git.kernel.org/stable/c/87bd909a7014e32790e8c759d5b7694a95778ca5",
        "https://git.kernel.org/stable/c/ab5d3420a1120950703dbdc33698b28a6ebc3d23",
        "https://git.kernel.org/stable/c/ab9e90619b6339becc5415647ae154a9a46a044d",
        "https://git.kernel.org/stable/c/b4a65d479213fe84ecb14e328271251eebe69492",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/49xxx/CVE-2024-49998.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-49998",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/49xxx/CVE-2024-49998.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-49998",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 493681,
  "published_at": "2024-10-21T18:02:38.316+00:00"
}