Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1489955

Re: [PATCH][V2] cxgb4: fix signed wrap around when decrementing index idx

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCH][V2] cxgb4: fix signed wrap around when decrementing index idx
Date 2016-09-23 13:30 +0200
Message-ID <skwQ2-2Yn-23@gated-at.bofh.it> (permalink)
References <skgLf-1mw-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Colin King <colin.king@canonical.com>
Date: Thu, 22 Sep 2016 18:48:58 +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>

Applied to net-next, thanks.

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH][V2] cxgb4: fix signed wrap around when decrementing index idx Colin King <colin.king@canonical.com> - 2016-09-22 20:20 +0200
  Re: [PATCH][V2] cxgb4: fix signed wrap around when decrementing  index idx David Miller <davem@davemloft.net> - 2016-09-23 13:30 +0200

csiph-web