{"answers":{"affected":"It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-47371 in the wild and no public exploit code.","fix":"Apply the vendor's patch.","what":"CVE-2021-47371 is a high-severity memory corruption vulnerability in Linux kernel, published on 21 May 2024. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-47371 and fix it if it is affected.\n\nWhat it is: CVE-2021-47371 is a high-severity memory corruption vulnerability in Linux kernel, published on 21 May 2024. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2021-47371 in the wild and no public exploit code.\n\nAffected product: Linux kernel. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-47371/ (Markdown: https://insights.sbomify.com/CVE-2021-47371/index.md)","id":"CVE-2021-47371","markdown":"https://insights.sbomify.com/CVE-2021-47371/index.md","name":"CVE-2021-47371","record":{"aliases":["DEBIAN-CVE-2021-47371","GHSA-8v6f-ww2f-hcqw","UBUNTU-CVE-2021-47371"],"analysis":{"component_type":"kernel","fix_type":"patch","impacts":["denial_of_service"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Linux kernel","requires_auth":"low_privilege","summary":"A memory leak in the Linux kernel nexthop notification chain allows local attackers to cause resource exhaustion and denial of service.","user_interaction":"not_required","vuln_class":"memory_corruption"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"Linux","cpe":[{"product":"linux_kernel","vendor":"linux"}],"cvss":{"score":7.1,"severity":"high","source":"cisa-adp","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-400","name":"Uncontrolled Resource Consumption"}],"description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnexthop: Fix memory leaks in nexthop notification chain listeners\n\nsyzkaller discovered memory leaks [1] that can be reduced to the\nfollowing commands:\n\n # ip nexthop add id 1 blackhole\n # devlink dev reload pci/0000:06:00.0\n\nAs part of the reload flow, mlxsw will unregister its netdevs and then\nunregister from the nexthop notification chain. Before unregistering\nfrom the notification chain, mlxsw will receive delete notifications for\nnexthop objects using netdevs registered by mlxsw or their uppers. mlxsw\nwill not receive notifications for nexthops using netdevs that are not\ndismantled as part of the reload flow. For example, the blackhole\nnexthop above that internally uses the loopback netdev as its nexthop\ndevice.\n\nOne way to fix this problem is to have listeners flush their nexthop\ntables after unregistering from the notification chain. This is\nerror-prone as evident by this patch and also not symmetric with the\nregistration path where a listener receives a dump of all the existing\nnexthops.\n\nTherefore, fix this problem by replaying delete notifications for the\nlistener being unregistered. This is symmetric to the registration path\nand also consistent with the netdev notification chain.\n\nThe above means that unregister_nexthop_notifier(), like\nregister_nexthop_notifier(), will have to take RTNL in order to iterate\nover the existing nexthops and that any callers of the function cannot\nhold RTNL. This is true for mlxsw and netdevsim, but not for the VXLAN\ndriver. To avoid a deadlock, change the latter to unregister its nexthop\nlistener without holding RTNL, making it symmetric to the registration\npath.\n\n[1]\nunreferenced object 0xffff88806173d600 (size 512):\n  comm \"syz-executor.0\", pid 1290, jiffies 4295583142 (age 143.507s)\n  hex dump (first 32 bytes):\n    41 9d 1e 60 80 88 ff ff 08 d6 73 61 80 88 ff ff  A..`......sa....\n    08 d6 73 61 80 88 ff ff 01 00 00 00 00 00 00 00  ..sa............\n  backtrace:\n    [\u003cffffffff81a6b576\u003e] kmemleak_alloc_recursive include/linux/kmemleak.h:43 [inline]\n    [\u003cffffffff81a6b576\u003e] slab_post_alloc_hook+0x96/0x490 mm/slab.h:522\n    [\u003cffffffff81a716d3\u003e] slab_alloc_node mm/slub.c:3206 [inline]\n    [\u003cffffffff81a716d3\u003e] slab_alloc mm/slub.c:3214 [inline]\n    [\u003cffffffff81a716d3\u003e] kmem_cache_alloc_trace+0x163/0x370 mm/slub.c:3231\n    [\u003cffffffff82e8681a\u003e] kmalloc include/linux/slab.h:591 [inline]\n    [\u003cffffffff82e8681a\u003e] kzalloc include/linux/slab.h:721 [inline]\n    [\u003cffffffff82e8681a\u003e] mlxsw_sp_nexthop_obj_group_create drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:4918 [inline]\n    [\u003cffffffff82e8681a\u003e] mlxsw_sp_nexthop_obj_new drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:5054 [inline]\n    [\u003cffffffff82e8681a\u003e] mlxsw_sp_nexthop_obj_event+0x59a/0x2910 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:5239\n    [\u003cffffffff813ef67d\u003e] notifier_call_chain+0xbd/0x210 kernel/notifier.c:83\n    [\u003cffffffff813f0662\u003e] blocking_notifier_call_chain kernel/notifier.c:318 [inline]\n    [\u003cffffffff813f0662\u003e] blocking_notifier_call_chain+0x72/0xa0 kernel/notifier.c:306\n    [\u003cffffffff8384b9c6\u003e] call_nexthop_notifiers+0x156/0x310 net/ipv4/nexthop.c:244\n    [\u003cffffffff83852bd8\u003e] insert_nexthop net/ipv4/nexthop.c:2336 [inline]\n    [\u003cffffffff83852bd8\u003e] nexthop_add net/ipv4/nexthop.c:2644 [inline]\n    [\u003cffffffff83852bd8\u003e] rtm_new_nexthop+0x14e8/0x4d10 net/ipv4/nexthop.c:2913\n    [\u003cffffffff833e9a78\u003e] rtnetlink_rcv_msg+0x448/0xbf0 net/core/rtnetlink.c:5572\n    [\u003cffffffff83608703\u003e] netlink_rcv_skb+0x173/0x480 net/netlink/af_netlink.c:2504\n    [\u003cffffffff833de032\u003e] rtnetlink_rcv+0x22/0x30 net/core/rtnetlink.c:5590\n    [\u003cffffffff836069de\u003e] netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline]\n    [\u003cffffffff836069de\u003e] netlink_unicast+0x5ae/0x7f0 net/netlink/af_netlink.c:1340\n    [\u003cffffffff83607501\u003e] netlink_sendmsg+0x8e1/0xe30 net/netlink/af_netlink.c:1929\n    [\u003cffffffff832fde84\u003e] sock_sendmsg_nosec net/socket.c:704 [inline\n---truncated---","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"nexthop: Fix memory leaks in nexthop notification chain listeners","id":"CVE-2021-47371","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":"linux:linux_kernel","products":["linux:linux_kernel"],"type":"memory_corruption","year":"2021"},"n_packages":0,"n_references":2,"next":{"headline":"net: macb: fix use after free on rmmod","id":"CVE-2021-47372"},"packages":[],"prev":{"headline":"mptcp: ensure tx skbs always have the MPTCP ext","id":"CVE-2021-47370"},"products":["Linux"],"published":"2024-05-21","related":[{"cvss_score":8.8,"headline":"Linux Kernel Out-of-Bounds Write","id":"CVE-2026-53266","kev_date_added":"2026-09-18","published":"2026-06-25"},{"cvss_score":8.8,"headline":"Linux Kernel Improper Input Validation","id":"CVE-2013-6282","kev_date_added":"2022-09-15","published":"2013-11-19"},{"cvss_score":8.4,"headline":"Linux Kernel Heap-Based Buffer Overflow","id":"CVE-2022-0185","kev_date_added":"2024-08-21","published":"2022-02-11"},{"cvss_score":8.4,"headline":"Linux Kernel Privilege Escalation","id":"CVE-2013-2094","kev_date_added":"2022-09-15","published":"2013-05-14"},{"cvss_score":7.8,"headline":"Linux Kernel Unspecified","id":"CVE-2026-53362","kev_date_added":"2026-08-27","published":"2026-07-04"},{"cvss_score":7.8,"headline":"Linux Kernel Missing Initialization of a Variable","id":"CVE-2026-46300","kev_date_added":"2026-10-28","published":"2026-05-23"},{"cvss_score":7.8,"headline":"Linux Kernel Race Condition","id":"CVE-2025-39964","kev_date_added":"2026-09-18","published":"2025-10-13"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-05-11","vendors":["Linux"]},"summary":"A memory leak in the Linux kernel nexthop notification chain allows local attackers to cause resource exhaustion and denial of service.","url":"https://insights.sbomify.com/CVE-2021-47371/"}