From: Dan Carpenter <dan.carpenter@oracle.com>
To: Shahed Shaikh <shahed.shaikh@qlogic.com>,
Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Cc: Dept-HSGLinuxNICDev@qlogic.com, netdev@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [patch] qlcnic: info leak in qlcnic_dcb_peer_app_info()
Date: Fri, 23 May 2014 16:37:21 +0000 [thread overview]
Message-ID: <20140523163721.GA14067@mwanda> (raw)
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>
---
This is a static analysis patch, and I am not familiar with this code.
We may want to put some useful information here, to go with the
app_count.
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.c
index a51fe18..561cb11 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.c
@@ -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))
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Shahed Shaikh <shahed.shaikh@qlogic.com>,
Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Cc: Dept-HSGLinuxNICDev@qlogic.com, netdev@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [patch] qlcnic: info leak in qlcnic_dcb_peer_app_info()
Date: Fri, 23 May 2014 19:37:21 +0300 [thread overview]
Message-ID: <20140523163721.GA14067@mwanda> (raw)
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>
---
This is a static analysis patch, and I am not familiar with this code.
We may want to put some useful information here, to go with the
app_count.
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.c
index a51fe18..561cb11 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.c
@@ -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))
next reply other threads:[~2014-05-23 16:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-23 16:37 Dan Carpenter [this message]
2014-05-23 16:37 ` [patch] qlcnic: info leak in qlcnic_dcb_peer_app_info() Dan Carpenter
2014-05-24 18:01 ` David Miller
2014-05-24 18:01 ` David Miller
2014-05-26 5:28 ` Sucheta Chakraborty
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140523163721.GA14067@mwanda \
--to=dan.carpenter@oracle.com \
--cc=Dept-HSGLinuxNICDev@qlogic.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shahed.shaikh@qlogic.com \
--cc=sucheta.chakraborty@qlogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.