From: Kalle Valo <kvalo@codeaurora.org>
To: Colin Ian King <colin.king@canonical.com>
Cc: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>,
linux-wireless@vger.kernel.org, wil6210@qca.qualcomm.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: wil6210: increase cmd buffer size to avoid sscanf buffer overflow
Date: Tue, 3 Mar 2015 13:48:34 +0000 (UTC) [thread overview]
Message-ID: <20150303134834.AA167140CD2@smtp.codeaurora.org> (raw)
In-Reply-To: <1425232113-5010-1-git-send-email-colin.king@canonical.com>
> From: Colin Ian King <colin.king@canonical.com>
>
> cppcheck detected a buffer overflow:
>
> [drivers/net/wireless/ath/wil6210/debugfs.c:634]: (error) Width 8
> given in format string (no. 1) is larger than destination buffer
> 'cmd[8]', use %7s to prevent overflowing it.
>
> For the current %8s sscanf we require cmd to be 9 chars long
> so increase it by 1 byte to prevent the sscan overflow (rather
> than reduce the %8s specifier to %7s as cppcheck recommends).
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Acked-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Thanks, applied to wireless-drivers-next.git.
Kalle Valo
prev parent reply other threads:[~2015-03-03 13:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-01 17:48 [PATCH] wil6210: increase cmd buffer size to avoid sscanf buffer overflow Colin King
[not found] ` <1425232113-5010-1-git-send-email-colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2015-03-02 8:24 ` Vladimir Kondratiev
2015-03-03 13:48 ` 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=20150303134834.AA167140CD2@smtp.codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=colin.king@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=qca_vkondrat@qca.qualcomm.com \
--cc=wil6210@qca.qualcomm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).