[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_93E4C66AC993AEC56EFA0CBB27DBC6CFD206@qq.com>
Date: Tue, 12 Nov 2024 18:57:59 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+58c872f7790a4d2ac951@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [netfilter?] KASAN: slab-out-of-bounds Read in bitmap_ip_add (2)
the value of first_ip or netmask are incorrect ?
#syz test
diff --git a/net/netfilter/ipset/ip_set_bitmap_ip.c b/net/netfilter/ipset/ip_set_bitmap_ip.c
index e4fa00abde6a..0fe17fba3b86 100644
--- a/net/netfilter/ipset/ip_set_bitmap_ip.c
+++ b/net/netfilter/ipset/ip_set_bitmap_ip.c
@@ -183,6 +183,10 @@ bitmap_ip_uadt(struct ip_set *set, struct nlattr *tb[],
for (; !before(ip_to, ip); ip += map->hosts) {
e.id = ip_to_id(map, ip);
+ printk("mnm: %u, firstip: %u, hosts: %u, id: %u, %s\n", (ip & ip_set_hostmask(map->netmask)), map->first_ip, map->hosts, e.id, __func__);
+ if (ip & ip_set_hostmask(map->netmask) < map->first_ip)
+ continue;
+
ret = adtfn(set, &e, &ext, &ext, flags);
if (ret && !ip_set_eexist(ret, flags))
Powered by blists - more mailing lists