logoalt Hacker News

jstimpfleyesterday at 6:45 AM2 repliesview on HN

Of course they are. The pointers to the vtable are part of the object. They aren't mutable fields as per the language, but for security concerns it doesn't matter what the language thinks. Being part of the object, the vtable pointer has to live in a writeable memory mapping (like stack / heap).


Replies

Conscatyesterday at 9:57 AM

Clang pointer authentication makes any type of vtable attack impossible in C++.

show 1 reply
kllrnohjyesterday at 11:30 AM

Then I don't understand your argument. If you're just saying what could go wrong with heap corruption, then your vtable complaint also applies to storing function pointers in arena allocators in Zig? Zig doesn't have anything special here?

show 1 reply