Re: [PATCH 3.19 v2 1/3] x86: Fix off-by-one in the instruction decoder length checks
From: Dave Hansen
Date: Mon Jan 12 2015 - 18:14:19 EST
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/