Re: [PATCH net] netfilter: x_tables: avoid stack-out-of-bounds read in xt_copy_counters_from_user

2017-10-06 Thread Pablo Neira Ayuso
On Thu, Oct 05, 2017 at 11:56:44AM +0200, Florian Westphal wrote: > Eric Dumazet wrote: > > From: Eric Dumazet > > > > syzkaller reports an out of bound read in strlcpy(), triggered > > by xt_copy_counters_from_user() > > > > Fix this by using

Re: [PATCH net] netfilter: x_tables: avoid stack-out-of-bounds read in xt_copy_counters_from_user

2017-10-05 Thread Florian Westphal
Eric Dumazet wrote: > From: Eric Dumazet > > syzkaller reports an out of bound read in strlcpy(), triggered > by xt_copy_counters_from_user() > > Fix this by using memcpy(), then forcing a zero byte at the last position > of the destination, as

[PATCH net] netfilter: x_tables: avoid stack-out-of-bounds read in xt_copy_counters_from_user

2017-10-05 Thread Eric Dumazet
From: Eric Dumazet syzkaller reports an out of bound read in strlcpy(), triggered by xt_copy_counters_from_user() Fix this by using memcpy(), then forcing a zero byte at the last position of the destination, as Florian did for the non COMPAT code. Fixes: d7591f0c41ce