aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/rtnetlink.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-10-13 04:45:28 -0400
committerDavid S. Miller <davem@davemloft.net>2016-10-13 12:12:04 -0400
commit775f4f05501b3e36550ab63a592de3abd02e7591 (patch)
tree8d0a411f4161bef506a355fa8605afdcc60bc8f4 /net/core/rtnetlink.c
parent7307616245babb12c923151d8ef69af02e46c255 (diff)
net: rtnl: info leak in rtnl_fill_vfinfo()
The "vf_vlan_info" struct ends with a 2 byte struct hole so we have to memset it to ensure that no stack information is revealed to user space. Fixes: 79aab093a0b5 ('net: Update API for VF vlan protocol 802.1ad support') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/rtnetlink.c')
-rw-r--r--net/core/rtnetlink.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index b06d2f46b83e..fb7348f13501 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -1144,6 +1144,8 @@ static noinline_for_stack int rtnl_fill_vfinfo(struct sk_buff *skb,
1144 if (dev->netdev_ops->ndo_get_vf_config(dev, vfs_num, &ivi)) 1144 if (dev->netdev_ops->ndo_get_vf_config(dev, vfs_num, &ivi))
1145 return 0; 1145 return 0;
1146 1146
1147 memset(&vf_vlan_info, 0, sizeof(vf_vlan_info));
1148
1147 vf_mac.vf = 1149 vf_mac.vf =
1148 vf_vlan.vf = 1150 vf_vlan.vf =
1149 vf_vlan_info.vf = 1151 vf_vlan_info.vf =