[PATCH net 2/2] ipv6: fix EFAULT on sendto with icmpv6 and hdrincl

2019-06-06 Thread Olivier Matz
_HDRINCL was not yet introduced. Only eat these 2 bytes if hdrincl == 0. Fixes: 715f504b1189 ("ipv6: add IPV6_HDRINCL option for raw sockets") Signed-off-by: Olivier Matz --- net/ipv6/raw.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/net/ipv6/raw.c b/net

[PATCH net 1/2] ipv6: use READ_ONCE() for inet->hdrincl as in ipv4

2019-06-06 Thread Olivier Matz
ducing a race condition in the next commit. Signed-off-by: Olivier Matz --- net/ipv6/raw.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index 96a3559f2a09..af2f9a833c4e 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c @@ -

[PATCH net 0/2] ipv6: fix EFAULT on sendto with icmpv6 and hdrincl

2019-06-06 Thread Olivier Matz
avoid a race condition in the second patch. Olivier Matz (2): ipv6: use READ_ONCE() for inet->hdrincl as in ipv4 ipv6: fix EFAULT on sendto with icmpv6 and hdrincl net/ipv6/raw.c | 25 ++--- 1 file changed, 18 insertions(+), 7 deletions(-) -- 2.11.0

[PATCH net] ip6_gre: fix tunnel list corruption for x-netns

2019-01-09 Thread Olivier Matz
retrieving the netns from device private area. Fixes: c8632fc30bb0 ("net: ip6_gre: Split up ip6gre_changelink()") Cc: Petr Machata Signed-off-by: Olivier Matz Acked-by: Nicolas Dichtel --- net/ipv6/ip6_gre.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv6/ip6_g