2 ms·
I haven’t read the whole thing yet but just zeroing allocations (see comment below on allocations versus pages) is not a full fix, because a UAF can come throug
by saagarjha 4y ago
I haven’t read the whole thing yet but just zeroing allocations (see comment below on allocations versus pages) is not a full fix, because a UAF can come through a dangling pointer. What you need to mitigate against this is preventing allocations from being reused. This is infeasible to do perfectly because it just means you leak everything but in isolated cases you can do things like prevent different types from being given the same allocation (and thus allowing for shenanigans when code does a type confusion) or do other kinds of segregation and randomization to make it difficult to predict when it will be coming back.