Settings

Theme

We Can Harden C

cybersect.substack.com

1 points by otoburb · 1 comment

Reader

1 thread
theamk

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()

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection