android_kernel_oneplus_msm8998/net
Eric Dumazet ad472d3a94 tcp: tcp_fragment() should apply sane memory limits
commit f070ef2ac66716357066b683fb0baf55f8191a2e 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-17 19:54:22 +02:00
..
6lowpan
9p 9p: do not trust pdu content for stat item size 2019-04-27 09:33:58 +02:00
802
8021q vlan: disable SIOCSHWTSTAMP in container 2019-05-16 19:45:17 +02:00
appletalk appletalk: Fix use-after-free in atalk_proc_exit 2019-04-27 09:33:59 +02:00
atm net: atm: Fix potential Spectre v1 vulnerabilities 2019-04-27 09:33:59 +02:00
ax25
batman-adv
bluetooth Bluetooth: Align minimum encryption key size for LE and BR/EDR connections 2019-05-16 19:45:04 +02:00
bridge bridge: Fix error path for kobject_init_and_add() 2019-05-16 19:45:17 +02:00
caif
can
ceph
core ethtool: check the return value of get_regs_len 2019-06-11 12:24:13 +02:00
dcb
dccp dccp: do not use ipv6 header for ipv4 flow 2019-04-03 06:23:25 +02:00
decnet
dns_resolver
dsa
ethernet
hsr net/hsr: fix possible crash in add_timer() 2019-03-23 08:44:31 +01:00
ieee802154
ipv4 tcp: tcp_fragment() should apply sane memory limits 2019-06-17 19:54:22 +02:00
ipv6 ipv6: Consider sk_bound_dev_if when binding a raw socket to an address 2019-06-11 12:24:06 +02:00
ipx
irda
iucv
key
l2tp l2tp: fix infoleak in l2tp_ip6_recvmsg() 2019-03-23 08:44:29 +01:00
l3mdev
lapb
llc llc: fix skb leak in llc_build_and_send_ui_pkt() 2019-06-11 12:24:06 +02:00
mac80211 mac80211/cfg80211: update bss channel on channel switch 2019-06-11 12:23:55 +02:00
mac802154
mpls
netfilter ipvs: do not schedule icmp errors from tunnels 2019-05-16 19:45:06 +02:00
netlabel
netlink
netrom
nfc
openvswitch openvswitch: fix flow actions reallocation 2019-04-27 09:33:54 +02:00
packet packet: Fix error path in packet_init 2019-05-16 19:45:17 +02:00
phonet phonet: fix building with clang 2019-03-23 08:44:34 +01:00
rds net: rds: fix memory leak in rds_ib_flush_mr_pool 2019-06-11 12:24:12 +02:00
rfkill
rose net: rose: fix a possible stack overflow 2019-04-03 06:23:25 +02:00
rxrpc
sched net: create skb_gso_validate_mac_len() 2019-06-11 12:24:10 +02:00
sctp sctp: initialize _pad of sockaddr_in before copying to user memory 2019-04-27 09:33:55 +02:00
sunrpc sunrpc: don't mark uninitialised items as VALID. 2019-05-16 19:44:44 +02:00
switchdev
tipc tipc: fix modprobe tipc failed after switch order of device registration -v2 2019-06-11 12:24:07 +02:00
unix missing barriers in some of unix_sock ->addr and ->path accesses 2019-03-23 08:44:31 +01:00
vmw_vsock
wimax
wireless mac80211/cfg80211: update bss channel on channel switch 2019-06-11 12:23:55 +02:00
x25 net/x25: fix a race in x25_bind() 2019-03-23 08:44:30 +01:00
xfrm xfrm: policy: Fix out-of-bound array accesses in __xfrm_policy_unlink 2019-06-11 12:23:48 +02:00
compat.c
Kconfig
Makefile
socket.c
sysctl_net.c