From andy.shevchenko at gmail.com  Wed Jan  7 15:18:41 2015
From: andy.shevchenko at gmail.com (Andy Shevchenko)
Date: Thu,  8 Jan 2015 01:18:41 +0200
Subject: [PATCH v1] libertas: avoid potential null-pointer dereference
Message-ID: <1420672721-8400-1-git-send-email-andy.shevchenko@gmail.com>

We have to check pointer before dereferencing it.

Reported-by: Andrey Karpov <karpov at viva64.com>
Signed-off-by: Andy Shevchenko <andy.shevchenko at gmail.com>
---
 drivers/net/wireless/libertas/cfg.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c
index 34f09ef..1d335e6 100644
--- a/drivers/net/wireless/libertas/cfg.c
+++ b/drivers/net/wireless/libertas/cfg.c
@@ -1109,7 +1109,7 @@ static int lbs_associate(struct lbs_private *priv,
 	size_t len, resp_ie_len;
 	int status;
 	int ret;
-	u8 *pos = &(cmd->iebuf[0]);
+	u8 *pos;
 	u8 *tmp;
 
 	lbs_deb_enter(LBS_DEB_CFG80211);
@@ -1138,6 +1138,8 @@ static int lbs_associate(struct lbs_private *priv,
 	cmd->listeninterval = cpu_to_le16(MRVDRV_DEFAULT_LISTEN_INTERVAL);
 	cmd->capability = cpu_to_le16(bss->capability);
 
+	pos = cmd->iebuf;
+
 	/* add SSID TLV */
 	rcu_read_lock();
 	ssid_eid = ieee80211_bss_get_ie(bss, WLAN_EID_SSID);
-- 
1.8.3.101.g727a46b



From andy.shevchenko at gmail.com  Thu Jan  8 00:06:52 2015
From: andy.shevchenko at gmail.com (Andy Shevchenko)
Date: Thu, 8 Jan 2015 10:06:52 +0200
Subject: [PATCH v1] libertas: avoid potential null-pointer dereference
In-Reply-To: <1420672721-8400-1-git-send-email-andy.shevchenko@gmail.com>
References: <1420672721-8400-1-git-send-email-andy.shevchenko@gmail.com>
Message-ID: <CAHp75Vc=mzubGFeSa08UXVmWerW8oJbrn01F6umdPO2m9ZhK=A@mail.gmail.com>

On Thu, Jan 8, 2015 at 1:18 AM, Andy Shevchenko
<andy.shevchenko at gmail.com> wrote:
> We have to check pointer before dereferencing it.

It seems it's correct in initial form. Discard this and sorry for noise.

>
> Reported-by: Andrey Karpov <karpov at viva64.com>
> Signed-off-by: Andy Shevchenko <andy.shevchenko at gmail.com>
> ---
>  drivers/net/wireless/libertas/cfg.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c
> index 34f09ef..1d335e6 100644
> --- a/drivers/net/wireless/libertas/cfg.c
> +++ b/drivers/net/wireless/libertas/cfg.c
> @@ -1109,7 +1109,7 @@ static int lbs_associate(struct lbs_private *priv,
>         size_t len, resp_ie_len;
>         int status;
>         int ret;
> -       u8 *pos = &(cmd->iebuf[0]);
> +       u8 *pos;
>         u8 *tmp;
>
>         lbs_deb_enter(LBS_DEB_CFG80211);
> @@ -1138,6 +1138,8 @@ static int lbs_associate(struct lbs_private *priv,
>         cmd->listeninterval = cpu_to_le16(MRVDRV_DEFAULT_LISTEN_INTERVAL);
>         cmd->capability = cpu_to_le16(bss->capability);
>
> +       pos = cmd->iebuf;
> +
>         /* add SSID TLV */
>         rcu_read_lock();
>         ssid_eid = ieee80211_bss_get_ie(bss, WLAN_EID_SSID);
> --
> 1.8.3.101.g727a46b
>



-- 
With Best Regards,
Andy Shevchenko


From alishamacleod996 at yahoo.pt  Wed Jan 28 13:08:57 2015
From: alishamacleod996 at yahoo.pt (Alisha Macleod)
Date: Wed, 28 Jan 2015 22:08:57 +0100
Subject: URGENT
Message-ID: <sYB5NjKwV9U3NMNfcBO1JywJxuuJIv2jAF04lr8RK0mP@yahoo.pt>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outstanding Inheritance.pdf
Type: application/pdf
Size: 9225 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/libertas-dev/attachments/20150128/91462fa1/attachment.pdf>

