android_kernel_sony_sdm845/tools/objtool
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Masami Hiramatsu 5a91fa530e x86/uprobes: Do not use prefixes.nbytes when looping over prefixes.bytes
commit 4e9a5ae8df5b3365183150f6df49e49dece80d8c upstream

Since insn.prefixes.nbytes can be bigger than the size of
insn.prefixes.bytes[] when a prefix is repeated, the proper check must
be

  insn.prefixes.bytes[i] != 0 and i < 4

instead of using insn.prefixes.nbytes.

Introduce a for_each_insn_prefix() macro for this purpose. Debugged by
Kees Cook <keescook@chromium.org>.

 [ bp: Massage commit message, sync with the respective header in tools/
   and drop "we". ]

Fixes: 2b14449835 ("uprobes, mm, x86: Add the ability to install and remove uprobes breakpoints")
Reported-by: syzbot+9b64b619f10f19d19a7c@syzkaller.appspotmail.com
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/160697103739.3146288.7437620795200799020.stgit@devnote2
[sudip: adjust context, use old insn.h]
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-11 13:38:01 +01:00
..
arch/x86 x86/uprobes: Do not use prefixes.nbytes when looping over prefixes.bytes 2020-12-11 13:38:01 +01:00
Documentation objtool: sync up with the 4.14.47 version of objtool 2018-06-05 10:28:57 +02:00
.gitignore objtool: update .gitignore file 2018-06-26 08:08:05 +08:00
arch.h objtool: sync up with the 4.14.47 version of objtool 2018-06-05 10:28:57 +02:00
Build objtool: sync up with the 4.14.47 version of objtool 2018-06-05 10:28:57 +02:00
builtin-check.c objtool: sync up with the 4.14.47 version of objtool 2018-06-05 10:28:57 +02:00
builtin-orc.c objtool: sync up with the 4.14.47 version of objtool 2018-06-05 10:28:57 +02:00
builtin.h objtool: sync up with the 4.14.47 version of objtool 2018-06-05 10:28:57 +02:00
cfi.h objtool: sync up with the 4.14.47 version of objtool 2018-06-05 10:28:57 +02:00
check.c objtool: Fix noreturn detection for ignored functions 2020-10-01 20:40:16 +02:00
check.h objtool: sync up with the 4.14.47 version of objtool 2018-06-05 10:28:57 +02:00
elf.c objtool: Support GCC 9 cold subfunction naming scheme 2019-08-06 18:29:42 +02:00
elf.h objtool: Support GCC 8's cold subfunctions 2018-06-05 10:28:57 +02:00
Makefile objtool: Clobber user CFLAGS variable 2019-10-05 12:30:08 +02:00
objtool.c objtool: sync up with the 4.14.47 version of objtool 2018-06-05 10:28:57 +02:00
orc.h objtool: sync up with the 4.14.47 version of objtool 2018-06-05 10:28:57 +02:00
orc_dump.c objtool: Support Clang non-section symbols in ORC dump 2020-05-02 17:23:17 +02:00
orc_gen.c objtool: sync up with the 4.14.47 version of objtool 2018-06-05 10:28:57 +02:00
special.c objtool: sync up with the 4.14.47 version of objtool 2018-06-05 10:28:57 +02:00
special.h
sync-check.sh objtool: sync up with the 4.14.47 version of objtool 2018-06-05 10:28:57 +02:00
warn.h objtool: sync up with the 4.14.47 version of objtool 2018-06-05 10:28:57 +02:00