linux-stable/net/core
Daniel Borkmann 364d5716a7 rtnetlink: ifla_vf_policy: fix misuses of NLA_BINARY
ifla_vf_policy[] is wrong in advertising its individual member types as
NLA_BINARY since .type = NLA_BINARY in combination with .len declares the
len member as *max* attribute length [0, len].

The issue is that when do_setvfinfo() is being called to set up a VF
through ndo handler, we could set corrupted data if the attribute length
is less than the size of the related structure itself.

The intent is exactly the opposite, namely to make sure to pass at least
data of minimum size of len.

Fixes: ebc08a6f47 ("rtnetlink: Add VF config code to rtnetlink")
Cc: Mitch Williams <mitch.a.williams@intel.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-07 22:13:10 -08:00
..
datagram.c skb_copy_datagram_iovec() can die 2014-12-09 16:29:11 -05:00
dev.c net: remove some sparse warnings 2015-02-05 00:41:17 -08:00
dev_addr_lists.c net: fix spelling for synchronized 2014-11-18 15:26:32 -05:00
dev_ioctl.c dev_ioctl: use sizeof(x) instead of sizeof x 2014-11-18 15:27:32 -05:00
drop_monitor.c net: Replace get_cpu_var through this_cpu_ptr 2014-08-26 13:45:47 -04:00
dst.c dst: no need to take reference on DST_NOCACHE dsts 2014-12-09 16:08:17 -05:00
ethtool.c ethtool: Support for configurable RSS hash function 2014-12-08 21:07:10 -05:00
fib_rules.c
filter.c net: sock: fix access via invalid file descriptor 2014-12-10 23:34:27 -05:00
flow.c flowcache: Fix kernel panic in flow_cache_flush_task 2015-02-05 14:38:53 -08:00
flow_dissector.c flow-dissector: Fix alignment issue in __skb_flow_get_ports 2014-10-10 15:33:47 -04:00
gen_estimator.c net: sched: make bstats per cpu and estimator RCU safe 2014-09-30 01:02:26 -04:00
gen_stats.c net_sched: fix unused variables in __gnet_stats_copy_basic_cpu() 2014-10-07 00:10:49 -04:00
iovec.c fold verify_iovec() into copy_msghdr_from_user() 2014-11-19 16:23:49 -05:00
link_watch.c net/core: include linux/types.h instead of asm/types.h 2014-11-18 15:26:32 -05:00
Makefile dmaengine-3.17 2014-10-07 20:39:25 -04:00
neighbour.c neighbour: fix base_reachable_time(_ms) not effective immediatly when changed 2015-01-14 00:28:00 -05:00
net-procfs.c
net-sysfs.c net-sysfs: expose physical switch id for particular device 2014-12-02 20:01:22 -08:00
net-sysfs.h
net-traces.c
net_namespace.c bury struct proc_ns in fs/proc 2014-12-04 14:34:54 -05:00
netclassid_cgroup.c cgroup: rename cgroup_subsys->base_cftypes to ->legacy_cftypes 2014-07-15 11:05:09 -04:00
netevent.c
netpoll.c vlan: introduce *vlan_hwaccel_push_inside helpers 2014-11-21 14:20:17 -05:00
netprio_cgroup.c cgroup: rename cgroup_subsys->base_cftypes to ->legacy_cftypes 2014-07-15 11:05:09 -04:00
pktgen.c pktgen: fix UDP checksum computation 2015-02-05 15:41:34 -08:00
ptp_classifier.c net: filter: split 'struct sk_filter' into socket and bpf parts 2014-08-02 15:03:58 -07:00
request_sock.c inet: reduce TLB pressure for listeners 2014-06-25 16:37:24 -07:00
rtnetlink.c rtnetlink: ifla_vf_policy: fix misuses of NLA_BINARY 2015-02-07 22:13:10 -08:00
scm.c net: introduce helper macro for_each_cmsghdr 2014-12-10 22:41:55 -05:00
secure_seq.c net: use ktime_get_ns() and ktime_get_real_ns() helpers 2014-08-22 19:57:23 -07:00
skbuff.c net: Reset secmark when scrubbing packet 2014-12-24 00:21:43 -05:00
sock.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2014-12-13 13:33:26 -08:00
sock_diag.c net: filter: split 'struct sk_filter' into socket and bpf parts 2014-08-02 15:03:58 -07:00
stream.c
sysctl_net_core.c net: provide a per host RSS key generic infrastructure 2014-11-16 15:59:11 -05:00
timestamping.c net-timestamp: Make the clone operation stand-alone from phy timestamping 2014-09-05 17:43:45 -07:00
tso.c net: tso: fix unaligned access to crafted TCP header in helper API 2014-10-22 12:52:55 -04:00
utils.c net: Convert LIMIT_NETDEBUG to net_dbg_ratelimited 2014-11-11 14:10:31 -05:00