From: David Miller <davem@davemloft.net>
To: colin.king@canonical.com
Cc: hariprasad@chelsio.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cxgb4: fix signed wrap around when decrementing index idx
Date: Thu, 22 Sep 2016 01:49:20 -0400 (EDT) [thread overview]
Message-ID: <20160922.014920.1225574247564649882.davem@davemloft.net> (raw)
In-Reply-To: <20160920144846.21765-1-colin.king@canonical.com>
From: Colin King <colin.king@canonical.com>
Date: Tue, 20 Sep 2016 15:48:45 +0100
> From: Colin Ian King <colin.king@canonical.com>
>
> Change predecrement compare to post decrement compare to avoid an
> unsigned integer wrap-around comparison when decrementing idx in
> the while loop.
>
> For example, when idx is zero, the current situation will
> predecrement idx in the while loop, wrapping idx to the maximum
> signed integer and cause out of bounds reads on rxq_info->msix_tbl[idx].
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
This doesn't apply cleanly to the 'net' tree, please respin.
prev parent reply other threads:[~2016-09-22 5:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-20 14:48 [PATCH] cxgb4: fix signed wrap around when decrementing index idx Colin King
2016-09-20 14:48 ` Colin King
2016-09-22 5:49 ` David Miller [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=20160922.014920.1225574247564649882.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=colin.king@canonical.com \
--cc=hariprasad@chelsio.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).