{"id":"CVE-2024-53211","summary":"net/l2tp: fix warning in l2tp_exit_net found by syzbot","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/l2tp: fix warning in l2tp_exit_net found by syzbot\n\nIn l2tp's net exit handler, we check that an IDR is empty before\ndestroying it:\n\n\tWARN_ON_ONCE(!idr_is_empty(&pn-\u003el2tp_tunnel_idr));\n\tidr_destroy(&pn-\u003el2tp_tunnel_idr);\n\nBy forcing memory allocation failures in idr_alloc_32, syzbot is able\nto provoke a condition where idr_is_empty returns false despite there\nbeing no items in the IDR. This turns out to be because the radix tree\nof the IDR contains only internal radix-tree nodes and it is this that\ncauses idr_is_empty to return false. The internal nodes are cleaned by\nidr_destroy.\n\nUse idr_for_each to check that the IDR is empty instead of\nidr_is_empty to avoid the problem.","modified":"2026-08-12T03:30:37.052920056Z","published":"2024-12-27T13:49:57.169Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/53xxx/CVE-2024-53211.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/5d066766c5f1252f98ff859265bcd1a5b52ac46c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a487cc8986d6dd75b60b59004f3bd2ea9b4dd541"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/53xxx/CVE-2024-53211.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-53211"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"73d33bd063c4cfef3db17f9bec3d202928ed8631"},{"fixed":"a487cc8986d6dd75b60b59004f3bd2ea9b4dd541"},{"fixed":"5d066766c5f1252f98ff859265bcd1a5b52ac46c"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-53211.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.12.0"},{"fixed":"6.12.2"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-53211.json"}}],"schema_version":"1.9.0"}