android_kernel_oneplus_msm8998/net/core
Willem de Bruijn f36f22a49d rose: limit sk_filter trim to payload
Sockets can have a filter program attached that drops or trims
incoming packets based on the filter program return value.

Rose requires data packets to have at least ROSE_MIN_LEN bytes. It
verifies this on arrival in rose_route_frame and unconditionally pulls
the bytes in rose_recvmsg. The filter can trim packets to below this
value in-between, causing pull to fail, leaving the partial header at
the time of skb_copy_datagram_msg.

Place a lower bound on the size to which sk_filter may trim packets
by introducing sk_filter_trim_cap and call this for rose packets.

CRs-Fixed: 1089895
Change-Id: Idc52737bc96097a9220dfe47bb76e94ff1026a05
Signed-off-by: Willem de Bruijn <willemb@google.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Git-commit: f4979fcea7fd36d8e2f556abef86f80e0d5af1ba
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[subashab@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2016-11-15 14:54:51 -07:00
..
datagram.c
dev.c net: core: Remove warning for cloned packets in ingress path 2016-10-12 14:03:34 -06:00
dev_addr_lists.c
dev_ioctl.c
drop_monitor.c
dst.c
ethtool.c
fib_rules.c
filter.c rose: limit sk_filter trim to payload 2016-11-15 14:54:51 -07:00
flow.c
flow_dissector.c Merge remote-tracking branch 'msm4.4/tmp-da9a92f' into msm-4.4 2016-10-28 10:48:35 -07:00
gen_estimator.c
gen_stats.c
link_watch.c
lwtunnel.c
Makefile net: sockev: Initial Commit 2016-03-22 11:09:38 -07:00
neighbour.c Merge remote-tracking branch 'msm4.4/tmp-da9a92f' into msm-4.4 2016-10-28 10:48:35 -07:00
net-procfs.c net: add a per-cpu counter for the number of frames coalesced in GRO 2016-03-22 11:09:45 -07:00
net-sysfs.c
net-sysfs.h
net-traces.c
net_namespace.c
netclassid_cgroup.c
netevent.c
netpoll.c
netprio_cgroup.c
pktgen.c
ptp_classifier.c
request_sock.c
rtnetlink.c net: fix infoleak in rtnetlink 2016-09-13 12:17:27 -07:00
scm.c
secure_seq.c
skbuff.c Merge remote-tracking branch 'msm4.4/tmp-da9a92f' into msm-4.4 2016-10-28 10:48:35 -07:00
sock.c
sock_diag.c net: diag: Add the ability to destroy a socket. 2016-04-07 16:49:53 +05:30
sockev_nlmcast.c net: core: Send only BIND and LISTEN events. 2016-03-23 21:19:16 -07:00
stream.c
sysctl_net_core.c
timestamping.c
tso.c
utils.c