lkml.org 
[lkml]   [2020]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: KASAN: slab-out-of-bounds Read in bitmap_port_destroy
On Fri, Jan 24, 2020 at 04:55:21PM +0800, Hillf Danton wrote:
> Ensure four bytes and ask slab to do the rest.
>
> --- a/include/linux/netfilter/ipset/ip_set.h
> +++ b/include/linux/netfilter/ipset/ip_set.h
> @@ -430,7 +430,7 @@ ip6addrptr(const struct sk_buff *skb, bo
> static inline int
> bitmap_bytes(u32 a, u32 b)
> {
> - return 4 * ((((b - a + 8) / 8) + 3) / 4);
> + return 4 + (b - a) / 8;
> }
>

Thanks, but this was already fixed by:

https://lore.kernel.org/netfilter-devel/alpine.DEB.2.20.2001192203200.18095@blackhole.kfki.hu/

regards,
dan carpenter

\
 
 \ /
  Last update: 2020-01-24 10:12    [W:1.044 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site