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
32-bit pointers.
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.
Change-Id: I3c4591dcde113e2696347298af5ad3671ef0e41c
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
5 files changed