Overview
| Artifact ID: | 4316977d28a8428fab70abe90d1f222f4ab765e54a0540cda794722f3d85817e |
|---|---|
| Ticket: | 37108037b980ea6e705f56a9d983e05ee218dd0c |
| Date: | 2022-08-12 23:21:33 |
| User: | jrtc27 |
| Artifact Attached: | 973b763342c6343c3c376da1ba32c0ec1f9ad847911c22b81058a729eee22198 |
| Filename: | 0006-tclExecute-Fix-for-CHERI-by-not-violating-object-all.patch |
| Description: | [PATCH 6/8] tclExecute: Fix for CHERI by not violating object allocation bounds This is needed to support CHERI, and thus Arm's experimental Morello prototype, where pointers are implemented using unforgeable capabilities that include bounds and permissions metadata to provide fine-grained spatial and referential memory safety, as well as revocation by sweeping memory to provide heap temporal memory safety. In the case that GrowEvaluationStack allocates a new stack, subtracting TD is strictly UB, since pointer subtraction is only defined within an object, not between objects. However, the bigger issue is that this is then added to TD-derived pointers to get equivalent pointers into the new stack, as well as reconstruct the new TD, but this is UB as pointer addition is only defined when the result is within the same object (or one-past-the-end). CHERI detects this and faults trying to update catchTop since the (hidden) dereference of TD is outside the bounds of the original TD's allocation. Fix this by deriving pointers from the new allocation, not the old one. |
Content:
(file is 0 bytes of binary data)