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>] [day] [month] [year] [list]
Date:	Tue, 26 Jan 2016 17:29:14 +0000
From:	Alan Davey <Alan.Davey@...aswitch.com>
To:	"David S. Miller" <davem@...emloft.net>,
	Alexey Kuznetsov <kuznet@....inr.ac.ru>,
	James Morris <jmorris@...ei.org>,
	Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
	Patrick McHardy <kaber@...sh.net>
CC:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: doubt about the behaviour of a Linux IPv4 raw socket, with the IP_HDRINCL option set, rejecting a packet bigger than the outgoing interface’s MTU size

Folks

I have a doubt about the behaviour of a Linux IPv4 raw socket, with the IP_HDRINCL option set, rejecting a packet bigger than the outgoing interface’s MTU size with EMSGSIZE.  Please take a look at the following and let me know if I should make a kernel code change to remove this behaviour and fragment the packet instead.

- raw_send_hdrinc() (net/ipv4/raw.c) has an explicit check for (length > rt->dst.dev->mtu), returning -EMSGSIZE if this is true.

- I do not understand the reason for this restriction.  If a packet was received on one interface and routed out through another interface with a smaller MTU then the packet would be fragmented.  Why is a locally originated packet treated differently?

- I note that the “raw(7) - Linux man page” lists “When the IP_HDRINCL option is set, datagrams will not be fragmented and are limited to the interface MTU” as a known bug.

Please let me know if you have any questions.

Regards
Alan Davey


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ