On Thu, 2017-09-21 at 15:20 -0600, Subash Abhinov Kasiviswanathan wrote:
> An out of bounds error was detected on an ARM64 target with
> Android based kernel 4.9. This occurs while trying to
> restore mark on a skb from an inet request socket.
>
> BUG: KASAN: slab-out-of-bounds in socket_match.isra.2+0xc8/0x1f0
> net/netfilter/xt_socket.c:248
...
>
> Fixes: a94070000388 ("netfilter: xt_socket: prepare for TCP_NEW_SYN_RECV
> support")
> Signed-off-by: Subash Abhinov Kasiviswanathan <[email protected]>
> ---
> net/netfilter/xt_socket.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/netfilter/xt_socket.c b/net/netfilter/xt_socket.c
> index e75ef39..3301091 100644
> --- a/net/netfilter/xt_socket.c
> +++ b/net/netfilter/xt_socket.c
> @@ -76,7 +76,7 @@
> transparent = nf_sk_is_transparent(sk);
>
> if (info->flags & XT_SOCKET_RESTORESKMARK && !wildcard &&
> - transparent)
> + transparent && sk_fullsock(sk))
> pskb->mark = sk->sk_mark;
>
> if (sk != skb->sk)
What about socket_mt6_v1_v2_v3() ?
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html