Re: [PATCH] x86/mpx: Fix off-by-one comparison with nr_registers
From: Dave Hansen
Date: Fri Feb 26 2016 - 14:16:45 EST
On 02/26/2016 10:55 AM, Colin King wrote:
> In the unlikely event that regno == nr_registers then we get an array
> overrun on regoff because the invalid register check is currently
> off-by-one. Fix this with a check that regno is >= nr_registers instead.
> Detected with static analysis using CoverityScan.
Oh, the irony of an overrun in the MPX code! Thanks for catching this.
Acked-by: Dave Hansen <dave.hansen@xxxxxxxxx>