Cook: Bounded flexible arrays in C
Kees Cook has posted adetailed document describing the work to improve safety offlexible-length arrays in the kernel.
Converting such codebases to use modern" language features, likethose in C99 (still from the prior millennium), can be a majorchallenge, but it is an entirely tractable problem. This post is adeep dive into an effort underway in the Linux kernel to make arrayindex overflows (and more generally, buffer overflows) a thing ofthe past, where they belong. Our success hinges on replacinganachronistic array definitions with well-defined C99 flexiblearrays.
This work has been covered here as well.