From: David Fries <David@Fries.net>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, Evgeniy Polyakov <zbr@ioremap.net>,
Dan Carpenter <dan.carpenter@oracle.com>,
Kees Cook <keescook@chromium.org>
Subject: [PATCH 2/2] w1: avoid potential u16 overflow
Date: Mon, 10 Nov 2014 20:19:37 -0600 [thread overview]
Message-ID: <1415672377-18758-3-git-send-email-David@Fries.net> (raw)
In-Reply-To: <1415672377-18758-1-git-send-email-David@Fries.net>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: David Fries <David@Fries.net>
---
drivers/w1/w1_netlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/w1/w1_netlink.c b/drivers/w1/w1_netlink.c
index dd96562..881597a 100644
--- a/drivers/w1/w1_netlink.c
+++ b/drivers/w1/w1_netlink.c
@@ -598,7 +598,7 @@ static void w1_cn_callback(struct cn_msg *cn, struct netlink_skb_parms *nsp)
msg = (struct w1_netlink_msg *)(cn + 1);
if (node_count) {
int size;
- u16 reply_size = sizeof(*cn) + cn->len + slave_len;
+ int reply_size = sizeof(*cn) + cn->len + slave_len;
if (cn->flags & W1_CN_BUNDLE) {
/* bundling duplicats some of the messages */
reply_size += 2 * cmd_count * (sizeof(struct cn_msg) +
--
1.7.10.4
prev parent reply other threads:[~2014-11-11 2:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-09 22:37 [PATHC 0/2] cn: w1: buffer size checks David Fries
2014-11-09 22:37 ` [PATCH 1/2] cn: verify msg->len before making callback David Fries
2014-11-09 22:37 ` [PATCH 2/2] w1: avoid potential u16 overflow David Fries
2014-11-10 0:12 ` [PATHC 0/2] cn: w1: buffer size checks Евгений Поляков
2014-11-11 2:19 ` David Fries
2014-11-11 2:19 ` [PATCH 1/2] cn: verify msg->len before making callback David Fries
2014-11-11 2:19 ` David Fries [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=1415672377-18758-3-git-send-email-David@Fries.net \
--to=david@fries.net \
--cc=dan.carpenter@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zbr@ioremap.net \
/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
Powered by JetHome