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-next>] [day] [month] [year] [list]
Message-ID: <6A051441C8B95A448E49718A747690B901CA76C741@gbplmail03.genband.com>
Date:	Fri, 10 Jun 2016 19:21:26 +0000
From:	Steven Caron <steven.caron@...band.com>
To:	Hannes Frederic Sowa <hannes@...essinduktion.org>,
	Cong Wang <xiyou.wangcong@...il.com>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"Linux Kernel Network Developers" <netdev@...r.kernel.org>,
	Steven Caron <steven.caron@...band.com>
Subject: PATCH [1/1] ipv4: Prevent malformed UFO fragments in ip_append_page

As  the ip fragment offset field counts 8-byte chunks, non-final ip
fragments must be multiples of 8 bytes of payload. Depending  on
the mtu and ip option sizes, ip_append_page wasn't respecting this,
notably when running NFS under UDP.

diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 124bf0a..21ec54e 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -1239,7 +1239,7 @@ ssize_t   ip_append_page(struct sock *sk, struct flowi4 *fl4, struct page *page,
                if (skb->ip_summed != CHECKSUM_PARTIAL)
                        return -EOPNOTSUPP;

-               skb_shinfo(skb)->gso_size = mtu - fragheaderlen;
+               skb_shinfo(skb)->gso_size = maxfraglen - fragheaderlen;
                skb_shinfo(skb)->gso_type = SKB_GSO_UDP;
        }
        cork->length += size;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ