CppCon 2018: Patricia Aas “Software Vulnerabilities in C and C++”

preview_player
Показать описание


What does a vulnerability using signed integer overflow look like? Or a stack buffer overflow? How does code like this look and how can we change the way we program to reduce our risk? The first half of this talk will show examples of many different vulnerabilities and describe how these are combined to make the first steps of an exploit. Then we will discuss what kind of programming practices we can employ to reduce the chances of these kinds of bugs creeping into our code.

Patricia Aas, TurtleSec
Programmer

Patricia has been programming C++ professionally for 13 years, she started out working on the Opera desktop browser and has looped back to browser making in the recent years, now working on the Vivaldi browser with many ex-opera colleagues. While away from the browser world she did a stint as a Java consultant coming back to C++ when working on embedded teleconference systems at Cisco. For the last couple of years she has begun doing public speaking, after only doing in-house speaking before. She is passionate about the tech industry and its impact on peoples lives. Since January she has been active in the #include<C++> community where she is one of the admins.


*-----*
*-----*
Рекомендации по теме
Комментарии
Автор

Fantastic job explaining the way exploits are written. Thanks!!

bobbymah
Автор

34:45, I once generated a dragon of a bug by cleverly compress 2 lines into 1. It ended up with ?: inside ?:, I don't know how many times. I guess there were 8 cases, in which those ?: were wrong about 2 of them. Automated tests would had clean that easily.
38:37, could you give an example? I use old style enum _a lot_, and I don't get into trouble.

MrAbrazildo
Автор

Great introduction for a programmer audience.
What I didn't get is what is meant by not allocating via new. The solution can't be make_shared, since it's also on the "not to do list", malloc is a worse idea, as, I presume, is not allocating on the heap at all. Should we put everything in pre-allocated buffers :-)? Can anybody clarify?

firstnamelastname
Автор

Not something to be proud of but her claim at 30:20 is wrong: "Incorrect type conversion [...] something you can do in C and C++ that you can't do in other languages". Here is a D program that does the same:

struct A {}
struct B {}

void main() {
auto a = new A();
auto b = cast(B*)a;
}

alicehreli
Автор

"turtle sex" on the first slide?

youtou
Автор

Totally a waste of time, for the same subject watch Matthew Butler's talk.

tauicsicsics