Re: [PATCH] netfilter: x_tables: fix incorrect parameter length before call copy_from_sockptr

From: Eric Dumazet
Date: Tue Apr 09 2024 - 12:15:23 EST



On 4/9/24 17:00, Edward Adam Davis wrote:
If len < sizeof(tmp) it will trigger oob, so take the min of them.

Signed-off-by: Edward Adam Davis <eadavis@xxxxxx>
---
net/ipv4/netfilter/arp_tables.c | 4 ++--
net/ipv4/netfilter/ip_tables.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)

Hi Edward

Already fixed in net tree


https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=0c83842df40f86e529db6842231154772c20edcc

Also a followup has been sent today

https://lore.kernel.org/netdev/20240409120741.3538135-1-edumazet@xxxxxxxxxx/T/#u

Thanks.