lineage_android_kernel_xiao.../net
Stefan Nuernberger b6b45bc40b net/ipv4: defensive cipso option parsing
commit 076ed3da0c9b2f88d9157dbe7044a45641ae369e upstream.

commit 40413955ee26 ("Cipso: cipso_v4_optptr enter infinite loop") fixed
a possible infinite loop in the IP option parsing of CIPSO. The fix
assumes that ip_options_compile filtered out all zero length options and
that no other one-byte options beside IPOPT_END and IPOPT_NOOP exist.
While this assumption currently holds true, add explicit checks for zero
length and invalid length options to be safe for the future. Even though
ip_options_compile should have validated the options, the introduction of
new one-byte options can still confuse this code without the additional
checks.

Signed-off-by: Stefan Nuernberger <snu@amazon.com>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: Simon Veith <sveith@amazon.de>
Cc: stable@vger.kernel.org
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-13 11:16:55 -08:00
..
6lowpan 6lowpan: iphc: reset mac_header after decompress to fix panic 2018-10-03 17:01:42 -07:00
9p net/9p: fix error path of p9_virtio_probe 2018-09-15 09:42:58 +02:00
802
8021q
appletalk
atm
ax25
batman-adv batman-adv: fix hardif_neigh refcount on queue_work() failure 2018-10-20 09:51:30 +02:00
bluetooth Bluetooth: SMP: fix crash in unpairing 2018-11-10 07:42:42 -08:00
bridge net: bridge: remove ipv6 zero address check in mcast queries 2018-11-10 07:42:57 -08:00
caif net: caif: Add a missing rcu_read_unlock() in caif_flow_cb 2018-09-05 09:20:00 +02:00
can
ceph
core cgroup, netclassid: add a preemption point to write_classid 2018-11-13 11:16:51 -08:00
dcb net: dcb: For wild-card lookups, use priority -1, not 0 2018-09-19 22:47:15 +02:00
dccp inet: make sure to grab rcu_read_lock before using ireq->ireq_opt 2018-10-18 09:13:23 +02:00
decnet
dns_resolver KEYS: DNS: fix parsing multiple options 2018-07-22 14:27:39 +02:00
dsa net: dsa: Do not suspend/resume closed slave_dev 2018-08-06 16:23:03 +02:00
ethernet
hsr
ieee802154 inet: frags: fix ip6frag_low_thresh boundary 2018-10-18 09:13:25 +02:00
ipv4 net/ipv4: defensive cipso option parsing 2018-11-13 11:16:55 -08:00
ipv6 ip6_tunnel: Fix encapsulation layout 2018-11-10 07:42:59 -08:00
ipx
irda irda: Only insert new objects into the global database via setsockopt 2018-09-15 09:43:01 +02:00
iucv
kcm kcm: Fix use-after-free caused by clonned sockets 2018-06-13 16:16:42 +02:00
key af_key: Always verify length of provided sadb_key 2018-06-16 09:52:32 +02:00
l2tp l2tp: remove configurable payload offset 2018-11-10 07:42:54 -08:00
l3mdev
lapb
llc llc: set SOCK_RCU_FREE in llc_sap_add_socket() 2018-11-10 07:42:57 -08:00
mac80211 mac80211: fix TX aggregation start/stop callback race 2018-11-10 07:42:47 -08:00
mac802154 net: mac802154: tx: expand tailroom if necessary 2018-09-09 20:01:19 +02:00
mpls
ncsi
netfilter netfilter: check for seqadj ext existence before adding it in nf_nat_setup_info 2018-10-20 09:51:32 +02:00
netlabel netlabel: check for IPV4MASK in addrinfo_get 2018-10-18 09:13:22 +02:00
netlink netlink: Don't shift on 64 for ngroups 2018-08-09 12:17:59 +02:00
netrom
nfc NFC: Fix possible memory corruption when handling SHDLC I-Frame commands 2018-09-29 03:07:30 -07:00
openvswitch
packet packet: refine ring v3 block size test to hold one frame 2018-08-24 13:12:41 +02:00
phonet
qrtr net: qrtr: Broadcast messages only from control port 2018-08-24 13:12:36 +02:00
rds rds: ib: Fix missing call to rds_ib_dev_put in rds_ib_setup_qp 2018-11-10 07:42:50 -08:00
rfkill
rose
rxrpc rxrpc: Only take the rwind and mtu values from latest ACK 2018-11-10 07:42:56 -08:00
sched net: sched: gred: pass the right attribute to gred_change_table_def() 2018-11-10 07:42:58 -08:00
sctp sctp: fix race on sctp_id2asoc 2018-11-10 07:42:58 -08:00
strparser
sunrpc sunrpc: Don't use stack buffer with scatterlist 2018-09-15 09:42:57 +02:00
switchdev
tipc tipc: fix a race condition of releasing subscriber object 2018-11-10 07:42:46 -08:00
unix
vmw_vsock vsock: split dwork to avoid reinitializations 2018-08-22 07:47:13 +02:00
wimax
wireless nl80211: Fix possible Spectre-v1 for NL80211_TXRATE_HT 2018-11-10 07:42:42 -08:00
x25
xfrm xfrm: policy: use hlist rcu variants on insert 2018-11-13 11:16:47 -08:00
Kconfig
Makefile
compat.c
socket.c net: socket: fix a missing-check bug 2018-11-10 07:42:58 -08:00
sysctl_net.c