From: Vipin Mehta <vmehta@atheros.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [patch 2/2] staging: ath6kl: buffer overflow in SEND_FRAME
Date: Sun, 20 Feb 2011 15:18:53 +0000 [thread overview]
Message-ID: <20110220151853.GB5683@vmehta-desktop> (raw)
In-Reply-To: <20110220124953.GB1898@bicker>
On Sun, Feb 20, 2011 at 04:49:53AM -0800, Dan Carpenter wrote:
> We should check that optTxFrmCmd.optIEDataLen isn't too large before we
> copy it into the data buffer.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
>
> diff --git a/drivers/staging/ath6kl/os/linux/ioctl.c b/drivers/staging/ath6kl/os/linux/ioctl.c
> index 17ba543..9a9a324 100644
> --- a/drivers/staging/ath6kl/os/linux/ioctl.c
> +++ b/drivers/staging/ath6kl/os/linux/ioctl.c
> @@ -3153,6 +3153,11 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
> break;
> }
>
> + if (optTxFrmCmd.optIEDataLen > MAX_OPT_DATA_LEN) {
> + ret = -EINVAL;
> + break;
> + }
> +
> if (copy_from_user(data, userdata+sizeof(WMI_OPT_TX_FRAME_CMD) - 1,
> optTxFrmCmd.optIEDataLen)) {
> ret = -EFAULT;
Acked-by: Vipin Mehta <vipin.mehta@atheros.com>
next prev parent reply other threads:[~2011-02-20 15:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-20 12:49 [patch 2/2] staging: ath6kl: buffer overflow in SEND_FRAME ioctl Dan Carpenter
2011-02-20 15:18 ` Vipin Mehta [this message]
2011-02-23 18:40 ` Luis R. Rodriguez
2011-02-23 18:54 ` Greg KH
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=20110220151853.GB5683@vmehta-desktop \
--to=vmehta@atheros.com \
--cc=kernel-janitors@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox