Upstream Kernel Hardening: Recent Progress and Challenges
summary
Linux upstream hardening is shrinking long‑standing C hazards by combining source transformations, compiler changes and new helpers: enabling the -fflex-array-not-at-end option cuts flex‑array warnings from ~60,000 to about 100 (≈85% fixed), a new trailing overlap macro documents intentional mid‑structure overlaps, and ~500 counted_by attribute annotations add runtime bounds checks; added counted_by_ptr, game_alloc helpers, partial type‑based slab support, KMALLOC_FLEX, GCC/Clang patches and ARM64 randomized syscall stack work; the last issues need compiler changes or wire‑format‑preserving edits and broad maintainer buy‑in.
AI-written summary · about
chapters (13)
- 0:00Linux kernel hardening intro
- 1:04Kernel hardening goals
- 3:17Flex array member compiler option
- 10:47Counted by annotations
- 12:54Type-based slab allocations
- 15:45Deprecation of string functions
- 16:28Fortify source and object size
- 21:32Abstract flex arrays ambiguity
- 25:49Randomized stack offset ARM64
- 26:32Kernel self-protection layers
- 29:05Enabling compiler options challenges
- 31:13Future work and extensions
- 33:22Takeaways and closing
related talks
40mUpstream Kernel Hardening: Progress on Enabling -Wflex-array-member-not-at-end
40mUpstream Kernel Hardening: Progress on Enabling -Wflex-array-member-not-at-end
29mThwarting Unknown Bugs: Hardening Features in the Mainline Linux Kernel
52mKernel Hardening: Ten Years Deep
01h 12mEnhancing Spatial Safety: Better Array-bounds Checking in C (and Linux)
38mTaking Kernel Hardening to the Next Level
34mMaking C Less Dangerous
35mDoes Making the Kernel Harder Make Making the Kernel Harder?
