criu/compel
Dmitry Safonov c200d80372 compel: separate get_strings_section from __handle_elf
I copied __ptr_oob* checks from util-vdso.c.
That will allow to check not only structure begin pointers,
but structure end also.
Before this patch code checked if strings section's header pointer is OOB,
but it did it after dereferencing this pointer, which is meaningless.

Now it checks:
- OOB of sections table,
- strings section's header should be inside sections table,
- check strings section with it's length for OOB.

In the very next patches I will add tests for this functions and
other compel-related changes.

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-14 21:03:29 +03:00
..
arch compel: fix build for ppc64 (typo) 2017-03-14 21:03:23 +03:00
include compel: add per-arch handle-elf.c 2017-03-14 21:03:22 +03:00
handle-elf-32.c compel: shuffle skeleton a bit 2017-03-14 21:03:22 +03:00
handle-elf.c compel: separate get_strings_section from __handle_elf 2017-03-14 21:03:29 +03:00
main.c compel: add per-arch handle-elf.c 2017-03-14 21:03:22 +03:00
Makefile compel: do not pass DEFINES two times to HOSTCFLAGS 2017-03-14 21:03:23 +03:00