diff options
author | Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> | 2011-10-07 22:31:55 +0900 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-10-10 09:05:51 +0200 |
commit | 53a019a951fae849471e4a620948c5f6886bd1a4 (patch) | |
tree | 3c37f0297b628e263f74f146352f39cd5401134a /lib/dynamic_debug.c | |
parent | 65112dccf8a113737684366349d7f9ec373ddc47 (diff) |
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 <masami.hiramatsu.pt@hitachi.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Andi Kleen <andi@firstfloor.org>
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 <peterz@infradead.org>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20111007133155.10933.58577.stgit@localhost.localdomain
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'lib/dynamic_debug.c')
0 files changed, 0 insertions, 0 deletions