[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54B45514.3070603@linux.intel.com>
Date: Mon, 12 Jan 2015 15:13:24 -0800
From: Dave Hansen <dave.hansen@...ux.intel.com>
To: Andy Lutomirski <luto@...capital.net>, x86@...nel.org,
linux-kernel@...r.kernel.org
CC: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Subject: Re: [PATCH 3.19 v2 1/3] x86: Fix off-by-one in the instruction decoder
length checks
On 01/12/2015 03:04 PM, Andy Lutomirski wrote:
> diff --git a/arch/x86/lib/insn.c b/arch/x86/lib/insn.c
> index 2480978b31cc..1313ae6b478b 100644
> --- a/arch/x86/lib/insn.c
> +++ b/arch/x86/lib/insn.c
> @@ -28,7 +28,7 @@
>
> /* Verify next sizeof(t) bytes can be on the same instruction */
> #define validate_next(t, insn, n) \
> - ((insn)->next_byte + sizeof(t) + n < (insn)->end_kaddr)
> + ((insn)->next_byte + sizeof(t) + n <= (insn)->end_kaddr)
>
> #define __get_next(t, insn) \
> ({ t r = *(t*)insn->next_byte; insn->next_byte += sizeof(t); r; })
This issue should already be handled by this patch:
http://git.kernel.org/tip/0f363b250b15af0f218bb2876d101fe5cd413f8b
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists