~/talk

Enhancing Spatial Safety: Better Array-bounds Checking in C (and Linux)

links:none on file
slides:none on file

Shows concrete fixes: replaces __builtin_object_size mode-zero with mode-one to stop the original "bad vibes" memcpy overflow, adds annotations using counted_by attribute (Clang 18 / GCC 15+) and uses -fstrict-flex-arrays to treat only C99 flexible members as variable length. Work audits ~60,000 warnings down to ~650 unique issues, converts years-old one/zero-length fake flex arrays with struct_size and KC_ALLOC fixes over five years, and adds runtime checks via building_dynamic_object_size — and it works.

AI-written summary · about

  1. 0:00Spatial safety in C
  2. 1:26Agenda
  3. 2:28C array basics
  4. 10:02Flexible arrays in kernel
  5. 13:29BleedingTooth vulnerabilities
  6. 20:38Object size function internals
  7. 27:43Fixing false positives with STRUCT_GROUP
  8. 33:27Trailing array ambiguity
  9. 40:39Flexible array challenges
  10. 51:05Counted by attribute
  11. 59:32Counted by for pointers
  12. 1:03:50Compiler hardening summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.