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: <CALx6S34j352=5nHr8ZJWT6=JdN4tfDTHobkGPRcZs0sLEPt-hg@mail.gmail.com>
Date:	Sat, 6 Feb 2016 12:45:26 -0800
From:	Tom Herbert <tom@...bertland.com>
To:	Alexander Duyck <aduyck@...antis.com>
Cc:	Linux Kernel Network Developers <netdev@...r.kernel.org>,
	Alexander Duyck <alexander.duyck@...il.com>,
	Edward Cree <ecree@...arflare.com>,
	"David S. Miller" <davem@...emloft.net>
Subject: Re: [net-next PATCH 05/10] net: Move skb_has_shared_frag check out of
 GRE code and into segmentation

On Fri, Feb 5, 2016 at 3:27 PM, Alexander Duyck <aduyck@...antis.com> wrote:
> The call skb_has_shared_frag is used in the GRE path and skb_checksum_help
> to verify that no frags can be modified by an external entity.  This check
> really doesn't belong in the GRE path but in the skb_segment function
> itself.  This way any protocol that might be segmented will be performing
> this check before attempting to offload a checksum to software.
>
> Signed-off-by: Alexander Duyck <aduyck@...antis.com>

Acked-by: Tom Herbert <tom@...bertland.com>

> ---
>  net/core/skbuff.c      |    5 +++++
>  net/ipv4/gre_offload.c |   11 -----------
>  2 files changed, 5 insertions(+), 11 deletions(-)
>
> diff --git a/net/core/skbuff.c b/net/core/skbuff.c
> index 9c065ac72e87..88262c82b96a 100644
> --- a/net/core/skbuff.c
> +++ b/net/core/skbuff.c
> @@ -3173,6 +3173,11 @@ skip_fraglist:
>
>  perform_csum_check:
>                 if (!csum) {
> +                       if (skb_has_shared_frag(nskb)) {
> +                               err = __skb_linearize(nskb);
> +                               if (err)
> +                                       goto err;
> +                       }
>                         if (!nskb->remcsum_offload)
>                                 nskb->ip_summed = CHECKSUM_NONE;
>                         SKB_GSO_CB(nskb)->csum =
> diff --git a/net/ipv4/gre_offload.c b/net/ipv4/gre_offload.c
> index 02cb1a416c7d..35a8dd35ed4e 100644
> --- a/net/ipv4/gre_offload.c
> +++ b/net/ipv4/gre_offload.c
> @@ -83,17 +83,6 @@ static struct sk_buff *gre_gso_segment(struct sk_buff *skb,
>                 if (csum) {
>                         __be32 *pcsum;
>
> -                       if (skb_has_shared_frag(skb)) {
> -                               int err;
> -
> -                               err = __skb_linearize(skb);
> -                               if (err) {
> -                                       kfree_skb_list(segs);
> -                                       segs = ERR_PTR(err);
> -                                       goto out;
> -                               }
> -                       }
> -
>                         skb_reset_transport_header(skb);
>
>                         greh = (struct gre_base_hdr *)
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ