1 of 16

How I research

Linux kernel security

from security researchers

Sabyrzhan “novitoll” Tasbolatov

Spectre Security Group

Spectre Security Group

2 of 16

whom I research

Spectre Security Group

  • Dmitry Vyukov, Andrey Konovalov - Google dynamic tools team
  • Alexander Popov - Positive Technologies
  • Vitaly Nikolenko - Duasynt
  • Brad Spengler & PaX team - grsecurity/PaX
  • Kees Cook - Google
  • Maddie Stone - Google P0

3 of 16

Spectre Security Group

some info might be incorrect due to

either lack of knowledge or misunderstanding the info from the source

4 of 16

Spectre Security Group

5 of 16

KASAN, KMSAN, KCSAN

Spectre Security Group

  • Tale of 1000 kernel bugs,

Dmitry Vyukov, 2018

  • KASAN in a bare-metal hypervisor, Alexander Popov, 2016

6 of 16

Spectre Security Group

  • KSPP mail list is not healthy?
  • YAMA LSM
  • bpf based seccomp

7 of 16

eBPF

Spectre Security Group

  • Userspace sends bytecode to the kernel together with a program type which determines what kernel areas can be accessed.

  • The kernel runs a verifier on the bytecode to make sure the program is safe to run (kernel/bpf/verifier.c).

  • The kernel JiT-compiles the bytecode to native code and inserts it in (or attaches to) the specified code location.

  • The inserted code writes data to ringbuffers or generic key-value maps.

  • Userspace reads the result values from the shared maps or ringbuffers.

8 of 16

GCC plugins

Spectre Security Group

9 of 16

STACKLEAK in Linux mainline

Spectre Security Group

10 of 16

grsecurity / PaX teams

Spectre Security Group

11 of 16

Tough 2018

Spectre Security Group

12 of 16

Google Project Zero blog.

In-the-wild exploits for Linux, Android

Spectre Security Group

13 of 16

Spectre Security Group

14 of 16

Spectre Security Group

15 of 16

Spectre Security Group

Points to an array of function addresses that must be called, in-order, to perform initialization. Some of the entries in the array can be 0 or -1, and should be ignored.

Note: this is generally stored in a .init_array section

16 of 16

Thanks! Questions?

Spectre Security Group

Sabyrzhan “novitoll” Tasbolatov

Spectre Security Group