CVE-2024-49998: Software Security Vulnerability Vulnerability
MODERATECVE-2024-49998 is a MODERATE (CVSS 4.7) security vulnerability vulnerability (CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition) affecting Software libraries in the Maven ecosystem. The weakness occurs when the product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check.. Remediation is available in the latest vendor maintenance releases.
CVE-2024-49998 at a Glance
Security Impact
CVSS: 4.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2024-49998
To remediate this vulnerability, upgrade all affected Software dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2024-49998, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree
Analyze the terminal output to locate any version of Software in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The mvn dependency:tree command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition, where the product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check. In Software, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
References
Frequently Asked Questions
What is CVE-2024-49998?
Which Software versions are affected?
What version fixes CVE-2024-49998?
What is the CVSS score of CVE-2024-49998?
What CWE is associated with CVE-2024-49998?
How can I check Maven dependencies for CVE-2024-49998?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3xm8-389p-x4rm",
"modified" : "2026-10-15T03:34:12Z",
"published" : "2024-10-21T18:30:59Z",
"aliases" : [ "CVE-2024-49998" ],
"details" : "In the Linux kernel, the following vulnerability has been resolved:\n\nnet: dsa: improve shutdown sequence\n\nAlexander Sverdlin presents 2 problems during shutdown with the\nlan9303 driver. One is specific to lan9303 and the other just happens\nto reproduce there.\n\nThe first problem is that lan9303 is unique among DSA drivers in that it\ncalls dev_get_drvdata() at \"arbitrary runtime\" (not probe, not shutdown,\nnot remove):\n\nphy_state_machine()\n-> ...\n -> dsa_user_phy_read()\n -> ds->ops->phy_read()\n -> lan9303_phy_read()\n -> chip->ops->phy_read()\n -> lan9303_mdio_phy_read()\n -> dev_get_drvdata()\n\nBut we never stop the phy_state_machine(), so it may continue to run\nafter dsa_switch_shutdown(). Our common pattern in all DSA drivers is\nto set drvdata to NULL to suppress the remove() method that may come\nafterwards. But in this case it will result in an NPD.\n\nThe second problem is that the way in which we set\ndp->conduit->dsa_ptr = NULL; is concurrent with receive packet\nprocessing. dsa_switch_rcv() checks once whether dev->dsa_ptr is NULL,\nbut afterwards, rather than continuing to use that non-NULL value,\ndev->dsa_ptr is dereferenced again and again without NULL checks:\ndsa_conduit_find_user() and many other places. In between dereferences,\nthere is no locking to ensure that what was valid once continues to be\nvalid.\n\nBoth problems have the common aspect that closing the conduit interface\nsolves them.\n\nIn the first case, dev_close(conduit) triggers the NETDEV_GOING_DOWN\nevent in dsa_user_netdevice_event() which closes user ports as well.\ndsa_port_disable_rt() calls phylink_stop(), which synchronously stops\nthe phylink state machine, and ds->ops->phy_read() will thus no longer\ncall into the driver after this point.\n\nIn the second case, dev_close(conduit) should do this, as per\nDocumentation/networking/driver.rst:\n\n| Quiescence\n| ----------\n|\n| After the ndo_stop routine has been called, the hardware must\n| not receive or transmit any data. All in flight packets must\n| be aborted. If necessary, poll or wait for completion of\n| any reset commands.\n\nSo it should be sufficient to ensure that later, when we zeroize\nconduit->dsa_ptr, there will be no concurrent dsa_switch_rcv() call\non this conduit.\n\nThe addition of the netif_device_detach() function is to ensure that\nioctls, rtnetlinks and ethtool requests on the user ports no longer\npropagate down to the driver - we're no longer prepared to handle them.\n\nThe race condition actually did not exist when commit 0650bf52b31f\n(\"net: dsa: be compatible with masters which unregister on shutdown\")\nfirst introduced dsa_switch_shutdown(). It was created later, when we\nstopped unregistering the user interfaces from a bad spot, and we just\nreplaced that sequence with a racy zeroization of conduit->dsa_ptr\n(one which doesn't ensure that the interfaces aren't up).",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-49998"
}, {
"type" : "WEB",
"url" : "https://cert-portal.siemens.com/productcert/html/ssa-019113.html"
}, {
"type" : "WEB",
"url" : "https://cert-portal.siemens.com/productcert/html/ssa-082556.html"
}, {
"type" : "WEB",
"url" : "https://cert-portal.siemens.com/productcert/html/ssa-457936.html"
}, {
"type" : "WEB",
"url" : "https://cert-portal.siemens.com/productcert/html/ssa-784472.html"
}, {
"type" : "WEB",
"url" : "https://git.kernel.org/stable/c/2e93bf719462ac6d23c881c8b93e5dc9bf5ab7f5"
}, {
"type" : "WEB",
"url" : "https://git.kernel.org/stable/c/6c24a03a61a245fe34d47582898331fa034b6ccd"
}, {
"type" : "WEB",
"url" : "https://git.kernel.org/stable/c/87bd909a7014e32790e8c759d5b7694a95778ca5"
}, {
"type" : "WEB",
"url" : "https://git.kernel.org/stable/c/ab5d3420a1120950703dbdc33698b28a6ebc3d23"
}, {
"type" : "WEB",
"url" : "https://git.kernel.org/stable/c/ab9e90619b6339becc5415647ae154a9a46a044d"
}, {
"type" : "WEB",
"url" : "https://git.kernel.org/stable/c/b4a65d479213fe84ecb14e328271251eebe69492"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-367" ],
"severity" : "MODERATE",
"github_reviewed" : false,
"github_reviewed_at" : null,
"nvd_published_at" : "2024-10-21T18:15:19Z"
}
}