From: Masami Hiramatsu Date: Fri, 7 Oct 2011 13:31:55 +0000 (+0900) Subject: x86: Fix insn decoder for longer instruction X-Git-Tag: v3.2-rc1~162^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53a019a951fae849471e4a620948c5f6886bd1a4;p=pandora-kernel.git x86: Fix insn decoder for longer instruction Fix x86 insn decoder for hardening against invalid length instructions. This adds length checkings for each byte-read site and if it exceeds MAX_INSN_SIZE, returns immediately. This can happen when decoding user-space binary. Caller can check whether it happened by checking insn.*.got member is set or not. Signed-off-by: Masami Hiramatsu Cc: Stephane Eranian Cc: Andi Kleen Cc: acme@redhat.com Cc: ming.m.lin@intel.com Cc: robert.richter@amd.com Cc: ravitillo@lbl.gov Cc: yrl.pp-manager.tt@hitachi.com Cc: Peter Zijlstra Cc: Srikar Dronamraju Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20111007133155.10933.58577.stgit@localhost.localdomain Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed