qlcnic: info leak in qlcnic_dcb_peer_app_info()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 23 May 2014 16:37:21 +0000 (19:37 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 24 May 2014 18:01:17 +0000 (14:01 -0400)
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: 48365e485275 ('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>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.c

index a51fe18f09a80e0d753f8ef7e8cd79142d69d0c3..561cb11ca58c5818dd1716c84ffff7eb9f000f8c 100644 (file)
@@ -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))