libipt: check section boundaries in pt_section_read()
When reading from a mapped section, we perform all kinds of overflow checks in
the various read functions. And we still missed an overflow on systems with
Move the check to pt_section_read() where we check the requested offset against
the section size. Also truncate the read request there, if necessary.
This fixes the overflow on systems with 32-bit pointers.
Signed-off-by: Markus Metzger <email@example.com>
5 files changed