HomeFreeBSD

Don't assume objects in program sections have a size of a pointer.

Description

Don't assume objects in program sections have a size of a pointer.

The size of the object at 'addr' is unknown and might be smaller than
the size of a pointer (e.g. some x86 instructions are smaller than a
pointer). Instead, just check that the address is in the bounds of
the program header.

Reported by: CHERI (indirectly)
Reviewed by: kib, brooks
Obtained from: CheriBSD
MFC after: 1 week
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D26279

Details

Provenance
jhbAuthored on Sep 2 2020, 8:43 PM
Parents
rG1a4531bc98da: Compute the correct size of the string to move forward.
Branches
Unknown
Tags
Unknown

Event Timeline