commit | f9ab03d5f281de5df86b7131930dc56bafb6f618 | [log] [tgz] |
---|---|---|
author | Kyle Zeng <[email protected]> | Tue Sep 05 15:04:09 2023 -0700 |
committer | Nandhini Rengaraj <[email protected]> | Wed Oct 04 17:44:05 2023 +0000 |
tree | 76d3a3a38c1e32bd16fc4a863612c291aae71e66 | |
parent | 46396331828f4d67391433b8282000d61d9e7b65 [diff] |
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=b/302919990 TEST=presubmit RELEASE_NOTE=Fix CVE-2023-42753 in the Linux Kernel. cos-patch: security-high Fixes: 886503f34d63 ("netfilter: ipset: actually allow allowable CIDR 0 in hash:net,port,net") Suggested-by: Jozsef Kadlecsik <[email protected]> Change-Id: Id592eb9d9d3c506703a483d90f914798fe27f48e Signed-off-by: Kyle Zeng <[email protected]> Acked-by: Jozsef Kadlecsik <[email protected]> Signed-off-by: Florian Westphal <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Nandhini Rengaraj <[email protected]> Reviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/58431 Reviewed-by: Oleksandr Tymoshenko <[email protected]> Tested-by: Cusky Presubmit Bot <[email protected]>