Bug 2334382 (CVE-2024-53211) - CVE-2024-53211 kernel: net/l2tp: fix warning in l2tp_exit_net found by syzbot
Summary: CVE-2024-53211 kernel: net/l2tp: fix warning in l2tp_exit_net found by syzbot
Keywords:
Status: NEW
Alias: CVE-2024-53211
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-12-27 14:03 UTC by OSIDB Bzimport
Modified: 2024-12-28 13:24 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2024-12-27 14:03:20 UTC
In the Linux kernel, the following vulnerability has been resolved:

net/l2tp: fix warning in l2tp_exit_net found by syzbot

In l2tp's net exit handler, we check that an IDR is empty before
destroying it:

	WARN_ON_ONCE(!idr_is_empty(&pn->l2tp_tunnel_idr));
	idr_destroy(&pn->l2tp_tunnel_idr);

By forcing memory allocation failures in idr_alloc_32, syzbot is able
to provoke a condition where idr_is_empty returns false despite there
being no items in the IDR. This turns out to be because the radix tree
of the IDR contains only internal radix-tree nodes and it is this that
causes idr_is_empty to return false. The internal nodes are cleaned by
idr_destroy.

Use idr_for_each to check that the IDR is empty instead of
idr_is_empty to avoid the problem.

Comment 1 Avinash Hanwate 2024-12-28 13:20:55 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2024122730-CVE-2024-53211-9837@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.