Skip to contentSkip to conversation

CVE-2024-53141: netfilter: ipset: add missing range check in bitmap_ip_uadt

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Dec 6, 2024

lore
Share & tools
lore
#0 lore raw

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

netfilter: ipset: add missing range check in bitmap_ip_uadt

When tb[IPSET_ATTR_IP_TO] is not present but tb[IPSET_ATTR_CIDR] exists, the values of ip and ip_to are slightly swapped. Therefore, the range check for ip should be done later, but this part is missing and it seems that the vulnerability occurs.

So we should add missing range checks and remove unnecessary range checks.

The Linux kernel CVE team has assigned CVE-2024-53141 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 2.6.39 with commit 72205fc68bd1 and fixed in 4.19.325 with commit 3c20b5948f11
	Issue introduced in 2.6.39 with commit 72205fc68bd1 and fixed in 6.11.11 with commit 591efa494a1c
	Issue introduced in 2.6.39 with commit 72205fc68bd1 and fixed in 6.12.2 with commit 15794835378e
	Issue introduced in 2.6.39 with commit 72205fc68bd1 and fixed in 6.13-rc1 with commit 35f56c554eb1

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2024-53141

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
net/netfilter/ipset/ip_set_bitmap_ip.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/3c20b5948f119ae61ee35ad8584d666020c91581
	https://git.kernel.org/stable/c/591efa494a1cf649f50a35def649c43ae984cd03
	https://git.kernel.org/stable/c/15794835378ed56fb9bacc6a5dd3b9f33520604e
	https://git.kernel.org/stable/c/35f56c554eb1b56b77b3cf197a6b00922d49033d