linux/include/uapi
Eric Dumazet dc97a907bc tcp: tcp_fragment() should apply sane memory limits
commit f070ef2ac6 upstream.

Jonathan Looney reported that a malicious peer can force a sender
to fragment its retransmit queue into tiny skbs, inflating memory
usage and/or overflow 32bit counters.

TCP allows an application to queue up to sk_sndbuf bytes,
so we need to give some allowance for non malicious splitting
of retransmit queue.

A new SNMP counter is added to monitor how many times TCP
did not allow to split an skb if the allowance was exceeded.

Note that this counter might increase in the case applications
use SO_SNDBUF socket option to lower sk_sndbuf.

CVE-2019-11478 : tcp_fragment, prevent fragmenting a packet when the
	socket is already using more than half the allowed space

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Jonathan Looney <jtl@netflix.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Yuchung Cheng <ycheng@google.com>
Reviewed-by: Tyler Hicks <tyhicks@canonical.com>
Cc: Bruce Curtis <brucec@netflix.com>
Cc: Jonathan Lemon <jonathan.lemon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[Salvatore Bonaccorso: Adjust context for backport to 4.9.168]
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2019-06-20 18:11:28 +01:00
..
asm-generic seccomp: add "seccomp" syscall 2018-09-25 23:47:34 +01:00
drm xdrm/i915: Use two 32bit reads for select 64bit REG_READ ioctls 2015-08-11 09:57:37 +01:00
linux tcp: tcp_fragment() should apply sane memory limits 2019-06-20 18:11:28 +01:00
mtd mtd: lpddr: add driver for LPDDR2-NVM PCM memories 2014-05-20 17:45:17 -07:00
rdma RDMA/uapi: Include socket.h in rdma_user_cm.h 2014-09-17 09:22:17 -07:00
scsi FCoE Updates for 3.9 2013-03-01 09:10:08 +00:00
sound ALSA: compress: fix the struct alignment to 4 bytes 2014-06-23 12:15:33 +02:00
video UAPI: (Scripted) Disintegrate include/video 2012-12-20 17:14:26 +00:00
xen xen: install xen/gntdev.h and xen/gntalloc.h 2014-02-11 10:12:36 -05:00
Kbuild UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00