lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPpH65yW5DKMzUJh2=8yM9Zm80aBdu2SvE-Cym2vnqJxUxib6A@mail.gmail.com>
Date:   Mon, 27 Apr 2020 16:48:22 +0200
From:   Andrea Claudi <aclaudi@...hat.com>
To:     Xin Long <lucien.xin@...il.com>
Cc:     network dev <netdev@...r.kernel.org>,
        Stephen Hemminger <stephen@...workplumber.org>,
        David Ahern <dsahern@...il.com>, Xiumei Mu <xmu@...hat.com>
Subject: Re: [PATCH iproute2] xfrm: also check for ipv6 state in xfrm_state_keep

On Mon, Apr 27, 2020 at 9:14 AM Xin Long <lucien.xin@...il.com> wrote:
>
> As commit f9d696cf414c ("xfrm: not try to delete ipcomp states when using
> deleteall") does, this patch is to fix the same issue for ip6 state where
> xsinfo->id.proto == IPPROTO_IPV6.
>
>   # ip xfrm state add src 2000::1 dst 2000::2 spi 0x1000 \
>     proto comp comp deflate mode tunnel sel src 2000::1 dst \
>     2000::2 proto gre
>   # ip xfrm sta deleteall
>   Failed to send delete-all request
>   : Operation not permitted
>
> Note that the xsinfo->proto in common states can never be IPPROTO_IPV6.
>
> Fixes: f9d696cf414c ("xfrm: not try to delete ipcomp states when using deleteall")
> Reported-by: Xiumei Mu <xmu@...hat.com>
> Signed-off-by: Xin Long <lucien.xin@...il.com>
> ---
>  ip/xfrm_state.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/ip/xfrm_state.c b/ip/xfrm_state.c
> index d68f600..f4bf335 100644
> --- a/ip/xfrm_state.c
> +++ b/ip/xfrm_state.c
> @@ -1131,7 +1131,8 @@ static int xfrm_state_keep(struct nlmsghdr *n, void *arg)
>         if (!xfrm_state_filter_match(xsinfo))
>                 return 0;
>
> -       if (xsinfo->id.proto == IPPROTO_IPIP)
> +       if (xsinfo->id.proto == IPPROTO_IPIP ||
> +           xsinfo->id.proto == IPPROTO_IPV6)
>                 return 0;
>
>         if (xb->offset > xb->size) {
> --
> 2.1.0
>

LGTM.
Acked-by: Andrea Claudi <aclaudi@...hat.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ