* [patch -next] net: rtnl: info leak in rtnl_fill_vfinfo()
@ 2016-10-13 8:45 Dan Carpenter
2016-10-13 16:12 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-10-13 8:45 UTC (permalink / raw)
To: David S. Miller, Moshe Shemesh
Cc: Roopa Prabhu, Nicolas Dichtel, Nikolay Aleksandrov, Eric Dumazet,
Hannes Frederic Sowa, Nogah Frankel, Brenden Blanco, netdev,
kernel-janitors
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>
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index b06d2f4..fb7348f 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,
if (dev->netdev_ops->ndo_get_vf_config(dev, vfs_num, &ivi))
return 0;
+ memset(&vf_vlan_info, 0, sizeof(vf_vlan_info));
+
vf_mac.vf =
vf_vlan.vf =
vf_vlan_info.vf =
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [patch -next] net: rtnl: info leak in rtnl_fill_vfinfo()
2016-10-13 8:45 [patch -next] net: rtnl: info leak in rtnl_fill_vfinfo() Dan Carpenter
@ 2016-10-13 16:12 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-10-13 16:12 UTC (permalink / raw)
To: dan.carpenter
Cc: moshe, roopa, nicolas.dichtel, nikolay, edumazet, hannes, nogahf,
bblanco, netdev, kernel-janitors
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Thu, 13 Oct 2016 11:45:28 +0300
> 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>
Applied, thanks Dan.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-13 16:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-13 8:45 [patch -next] net: rtnl: info leak in rtnl_fill_vfinfo() Dan Carpenter
2016-10-13 16:12 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).