Hacker News new | ask | show | jobs
We Can Harden C (cybersect.substack.com)
1 points by otoburb 51 days ago
1 comments

There is a lot of general handwaving, but for the practical advice, author only focus on single thing: out-of-bounds array accesses. And their solution is __attribute__((counted_by(...))) + to-be-written compiler extension which would statically check all the array dereferences.

This is amazingly naive. C has significant amount of problems, and while OOB array accesses cause a lot of bugs, there are plenty of other C parts which cause bugs too (like use-after-free and concurrency). And even if we just focus on the OOB array accesses, there are a lot of places which cannot be covered by simple counted_by()