From: Kalle Valo <kvalo@codeaurora.org>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: "Arend van Spriel" <arend.vanspriel@broadcom.com>,
"Franky Lin" <franky.lin@broadcom.com>,
"Hante Meuleman" <hante.meuleman@broadcom.com>,
"Pieter-Paul Giesberts" <pieter-paul.giesberts@broadcom.com>,
"Franky Lin" <frankyl@broadcom.com>,
linux-wireless@vger.kernel.org,
brcm80211-dev-list.pdl@broadcom.com,
"Rafał Miłecki" <rafal@milecki.pl>
Subject: Re: [V3] brcmfmac: avoid writing channel out of allocated array
Date: Tue, 17 Jan 2017 11:57:15 +0000 (UTC) [thread overview]
Message-ID: <20170117115715.A8C43607C9@smtp.codeaurora.org> (raw)
In-Reply-To: <20170104110941.21261-1-zajec5@gmail.com>
Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
>
> Our code was assigning number of channels to the index variable by
> default. If firmware reported channel we didn't predict this would
> result in using that initial index value and writing out of array. This
> never happened so far (we got a complete list of supported channels) but
> it means possible memory corruption so we should handle it anyway.
>
> This patch simply detects unexpected channel and ignores it.
>
> As we don't try to create new entry now, it's also safe to drop hw_value
> and center_freq assignment. For known channels we have these set anyway.
>
> I decided to fix this issue by assigning NULL or a target channel to the
> channel variable. This was one of possible ways, I prefefred this one as
> it also avoids using channel[index] over and over.
>
> Fixes: 58de92d2f95e ("brcmfmac: use static superset of channels for wiphy bands")
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Patch applied to wireless-drivers-next.git, thanks.
77c0d0cd10e7 brcmfmac: avoid writing channel out of allocated array
--
https://patchwork.kernel.org/patch/9496471/
Documentation about submitting wireless patches and checking status
from patchwork:
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
prev parent reply other threads:[~2017-01-17 12:06 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-03 8:38 [PATCH] brcmfmac: avoid writing channel out of allocated array Rafał Miłecki
2017-01-03 11:02 ` Arend Van Spriel
2017-01-03 11:31 ` Rafał Miłecki
2017-01-03 13:19 ` Arend Van Spriel
2017-01-03 14:14 ` Rafał Miłecki
2017-01-03 15:49 ` Rafał Miłecki
2017-01-04 8:12 ` Kalle Valo
2017-01-04 8:14 ` Kalle Valo
2017-01-04 8:08 ` Kalle Valo
2017-01-03 16:49 ` [PATCH next V2] " Rafał Miłecki
2017-01-04 9:39 ` Arend Van Spriel
2017-01-04 10:40 ` Rafał Miłecki
2017-01-04 10:48 ` Arend Van Spriel
2017-01-04 11:04 ` Rafał Miłecki
2017-01-04 11:09 ` [PATCH V3] " Rafał Miłecki
2017-01-04 11:11 ` Arend Van Spriel
2017-01-17 11:57 ` Kalle Valo [this message]
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=20170117115715.A8C43607C9@smtp.codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=arend.vanspriel@broadcom.com \
--cc=brcm80211-dev-list.pdl@broadcom.com \
--cc=franky.lin@broadcom.com \
--cc=frankyl@broadcom.com \
--cc=hante.meuleman@broadcom.com \
--cc=linux-wireless@vger.kernel.org \
--cc=pieter-paul.giesberts@broadcom.com \
--cc=rafal@milecki.pl \
--cc=zajec5@gmail.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.