CTSRD-CHERI / cheri-exercises

Learning exercises for CHERI
https://ctsrd-cheri.github.io/cheri-exercises/
Other
18 stars 10 forks source link

buffer-overflow-control-flow: Add the first focused adversarial mission #5

Closed jrtc27 closed 4 years ago

jrtc27 commented 4 years ago

Verified to compile warning-free but not yet tested beyond that.

jrtc27 commented 4 years ago

Verified:

NB: 25000 was chosen because it's a nice number such that CRRL(25000) >= roundup2(25000, 16) + 16 (where the roundup2(_, 16) comes from malloc alignment requirements), ensuring there is at least (in this case, exactly) 16 bytes of overlap so the entirety of *fptr is reachable from buf.