Skip to content

Commit

Permalink
qlcnic: info leak in qlcnic_dcb_peer_app_info()
Browse files Browse the repository at this point in the history
This function is called from dcbnl_build_peer_app().  The "info"
struct isn't initialized at all so we disclose 2 bytes of uninitialized
stack data.  We should clear it before passing it to the user.

Fixes: 48365e4 ('qlcnic: dcb: Add support for CEE Netlink interface.')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed May 24, 2014
1 parent 1d61367 commit 7df566b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,7 @@ static int qlcnic_dcb_peer_app_info(struct net_device *netdev,
struct qlcnic_dcb_cee *peer;
int i;

memset(info, 0, sizeof(*info));
*app_count = 0;

if (!test_bit(QLCNIC_DCB_STATE, &adapter->dcb->state))
Expand Down

0 comments on commit 7df566b

Please sign in to comment.