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] [day] [month] [year] [list]
Date:	Mon, 02 Mar 2015 22:19:59 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	mkubecek@...e.cz
Cc:	kuznet@....inr.ac.ru, jmorris@...ei.org, yoshfuji@...ux-ipv6.org,
	kaber@...sh.net, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] udp: only allow UFO for packets from SOCK_DGRAM
 sockets

From: Michal Kubecek <mkubecek@...e.cz>
Date: Mon,  2 Mar 2015 18:27:11 +0100 (CET)

> If an over-MTU UDP datagram is sent through a SOCK_RAW socket to a
> UFO-capable device, ip_ufo_append_data() sets skb->ip_summed to
> CHECKSUM_PARTIAL unconditionally as all GSO code assumes transport layer
> checksum is to be computed on segmentation. However, in this case,
> skb->csum_start and skb->csum_offset are never set as raw socket
> transmit path bypasses udp_send_skb() where they are usually set. As a
> result, driver may access invalid memory when trying to calculate the
> checksum and store the result (as observed in virtio_net driver).
> 
> Moreover, the very idea of modifying the userspace provided UDP header
> is IMHO against raw socket semantics (I wasn't able to find a document
> clearly stating this or the opposite, though). And while allowing
> CHECKSUM_NONE in the UFO case would be more efficient, it would be a bit
> too intrusive change just to handle a corner case like this. Therefore
> disallowing UFO for packets from SOCK_DGRAM seems to be the best option.
> 
> Signed-off-by: Michal Kubecek <mkubecek@...e.cz>

Seems reasonable to me, applied, thanks!
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists