Flexible Array Transformations and Array-bounds Checking - Gustavo A. R. Silva, The Linux Foundation
Evaluates flexible Array Transformations and Array-bounds Checking - Gustavo A. R. Silva, The Linux Foundation and evaluates key implications for security practitioners.
Summary
Kernel Background
Gustavo Silva of the Linux kernel self-protection project and Google OSS security explains how C arrays, trailing arrays, and flexible structures underpin much kernel code—and many bugs.
Flexible Array History
Kernel code historically declared variable-length trailing data using one-element or zero-length array hacks predating C99 flexible array members. One-element arrays skew size calculations and invite off-by-one allocation mistakes.
True vs Fake Flex Arrays
C99 flexible array members are the standards-based approach, unlike GNU zero-length extensions or deprecated one-element patterns. Silva shows why developers must subtract phantom element sizes or use struct_size helpers when allocating.
Project Goals
Multiple incompatible flexible-array styles block reliable bounds checking across the tree. The ongoing transformation work audits size usage, updates user API call sites, and aims to remove ambiguity so the kernel can enforce safer array access.
Related talks
Linux Security Summit Europe·50 min
Paul Moore
Details io_uring: So Fast. Its Scary and evaluates key implications for security practitioners.
Linux Security Summit Europe·27 min
HotBPF - An On-demand and On-the-fly Memory Protection for the Linux Ker... Yueqi Chen & Zhenpeng Li
Analyzes hotBPF - An On-demand and On-the-fly Memory Protection for the Linux Ker... Yueqi Chen & Zhenpeng Li and evaluates key implications for security practitioners.
Linux Security Summit Europe·47 min
Jeremy Powell · Advanced Micro Devices
Demonstrates AMD SEV-SNP Attestation: Establishing Trust in Guests and evaluates key implications for security practitioners.


