Skip to content
0:00 / 0:00

#linuxkernel#keescook#undefinedbehavior

Making C Less Dangerous in the Linux kernel

linux.conf.au

32K subscribers • 14 videos on Hallway

YouTube
  • Recommended by 2 people: 1 on Lobsters and 1 in engineering communities.
  • Presented by Kees Cook, Linux kernel security engineer

Advanced. Deep dive for people who know the field.

82K views7 years ago2 recommendations

Systems programmingSecurityCLinuxOperating systems

Kees Cook explores how the Linux kernel project is mitigating C language hazards by eliminating undefined behaviors and enforcing safer compiler options.

Kees Cook 2019.linux.conf.au/schedule/presentation/178/ With the Linux kernel written in C, it comes with some worrisome baggage, "undefined" behaviors, and other weaknesses that lead to security flaws and vulnerable infrastructure. Some of these weaknesses related to the design of chipsets and how close C is to machine code, but others are less specific. This presentation will explore the areas where the kernel is changing the C standard, defining undefined behaviors, or otherwise reorganizing things to make C itself less of a hazard. Specifically this will cover removing (and enforcing the lack of) Variable Length Arrays in kernel code, forcing all stack variables to be initialized with a GCC plugin, performing implicit bounds checking with overloaded builtins, handling arithmetic overflows safely, and protecting forward (call) and reverse (return) indirect function calls with CFI under Clang. linux.conf.au is a conference about the Linux operating system, and all aspects of the thriving ecosystem of Free and Open Source Software that has grown up around it. Run since 1999, in a different Australian or New Zealand city each year, by a team of local volunteers, LCA invites more than 500 people to learn from the people who shape the future of Open Source. For more information on the conference see linux.conf.au/ #linux.conf.au #linux #foss #opensource

Why it's here

2 people recommend this

What people say. Recommended as an insightful talk on modern compiler mitigations and hardening techniques used in the Linux kernel.

Moments people linked to

u/mttdin r/C_Programming • Recommends

Making C Less Dangerous in the Linux kernel

calvinon Lobsters • Recommends

Making C Less Dangerous in the Linux kernel

u/N-R-Kin r/C_Programming • Mentions

On “Misc of C Programming”

I do maintain a private list of articles/videos that I find useful. It's too messy to copy paste in it's entirety, so I'll pick out some of the good ones here: - Quick references: * https://en.cppreference.com/w/c (can be downloaded to be viewed offline as well!) * http://www.c-faq.com * https://port70.net/~nsz/c/ contains drafts of various C standards - Memory management: * Handles are the better pointer * Memory allocation strategies (some of the code shown are a bit over-engineered IMO, but the principle is good) * Untangling Lifetimes: The Arena Allocator - Concurrency: * Hardware memory model * Futexes are tricky * [C++ atomics, from basic to advanced. What do they really do…

u/Fedackingin r/C_Programming • Mentions

On “Making C Less Dangerous in the Linux kernel”

The fall through comment stuff is ... really bad Timestamp
3View on Reddit