Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 49de253f authored by Kyle Zeng's avatar Kyle Zeng Committed by Lee Jones
Browse files

UPSTREAM: netfilter: ipset: add the missing IP_SET_HASH_WITH_NET0 macro for...


UPSTREAM: netfilter: ipset: add the missing IP_SET_HASH_WITH_NET0 macro for ip_set_hash_netportnet.c

commit 050d91c03b28ca479df13dfb02bcd2c60dd6a878 upstream.

The missing IP_SET_HASH_WITH_NET0 macro in ip_set_hash_netportnet can
lead to the use of wrong `CIDR_POS(c)` for calculating array offsets,
which can lead to integer underflow. As a result, it leads to slab
out-of-bound access.
This patch adds back the IP_SET_HASH_WITH_NET0 macro to
ip_set_hash_netportnet to address the issue.

Bug: 302199939
Fixes: 886503f3 ("netfilter: ipset: actually allow allowable CIDR 0 in hash:net,port,net")
Suggested-by: default avatarJozsef Kadlecsik <kadlec@netfilter.org>
Signed-off-by: default avatarKyle Zeng <zengyhkyle@gmail.com>
Acked-by: default avatarJozsef Kadlecsik <kadlec@netfilter.org>
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit a9e6142e5f8f6ac7d1bca45c1b2b13b084ea9e14)
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: I11cc1650e7df9d54041164b6bdb01f3a0de46de4
parent 756378d5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment