SlideShare a Scribd company logo
1 of 51
AddressSanitizer и ThreadSanitizer:
Поиск ошибок и уязвимостей
в браузере Chrome и серверных приложениях
Костя Серебряный, Google
30 Мая 2013
• AddressSanitizer (aka ASan)
o detects use-after-free and buffer overflows (C++)
• ThreadSanitizer (aka TSan)
o detects data races (C++ & Go)
• MemorySanitizer (aka MSan)
o detects uninitialized memory reads (C++)
• Similar tools, find different kinds of bugs
Agenda
AddressSanitizer
addressability bugs
AddressSanitizer overview
• Finds
o buffer overflows (stack, heap, globals)
o use-after-free
o some more
• Compiler module (LLVM, GCC)
• Run-time library
int global_array[100] = {-1};
int main(int argc, char **argv) {
return global_array[argc + 100]; // BOOM
}
% clang++ -O1 -fsanitize=address a.cc ; ./a.out
==10538== ERROR: AddressSanitizer global-buffer-overflow
READ of size 4 at 0x000000415354 thread T0
#0 0x402481 in main a.cc:3
#1 0x7f0a1c295c4d in __libc_start_main ??:0
#2 0x402379 in _start ??:0
0x000000415354 is located 4 bytes to the right of global
variable 'global_array' (0x4151c0) of size 400
ASan report example: global-buffer-overflow
int main(int argc, char **argv) {
int stack_array[100];
stack_array[1] = 0;
return stack_array[argc + 100]; // BOOM
}
% clang++ -O1 -fsanitize=address a.cc; ./a.out
==10589== ERROR: AddressSanitizer stack-buffer-overflow
READ of size 4 at 0x7f5620d981b4 thread T0
#0 0x4024e8 in main a.cc:4
Address 0x7f5620d981b4 is located at offset 436 in frame
<main> of T0's stack:
This frame has 1 object(s):
[32, 432) 'stack_array'
ASan report example: stack-buffer-overflow
int main(int argc, char **argv) {
int *array = new int[100];
int res = array[argc + 100]; // BOOM
delete [] array;
return res;
}
% clang++ -O1 -fsanitize=address a.cc; ./a.out
==10565== ERROR: AddressSanitizer heap-buffer-overflow
READ of size 4 at 0x7fe4b0c76214 thread T0
#0 0x40246f in main a.cc:3
0x7fe4b0c76214 is located 4 bytes to the right of 400-byte
region [0x7fe..., 0x7fe...)
allocated by thread T0 here:
#0 0x402c36 in operator new[](unsigned long)
#1 0x402422 in main a.cc:2
ASan report example: heap-buffer-overflow
ASan report example: use-after-free
int main(int argc, char **argv) {
int *array = new int[100];
delete [] array;
return array[argc]; // BOOM
}
% clang++ -O1 -fsanitize=address a.cc && ./a.out
==30226== ERROR: AddressSanitizer heap-use-after-free
READ of size 4 at 0x7faa07fce084 thread T0
#0 0x40433c in main a.cc:4
0x7faa07fce084 is located 4 bytes inside of 400-byte
region
freed by thread T0 here:
#0 0x4058fd in operator delete[](void*) _asan_rtl_
#1 0x404303 in main a.cc:3
previously allocated by thread T0 here:
#0 0x405579 in operator new[](unsigned long) _asan_rtl_
Any aligned 8 bytes may have 9 states:
N good bytes and 8 - N bad (0<=N<=8)
0
7
6
5
4
3
2
1
-1
Good byte
Bad byte
Shadow value
ASan shadow byte
ASan virtual address space (-pie)
0xffffffff
0x20000000
0x1fffffff
0x04000000
0x03ffffff
0x00000000
Application
Shadow
mprotect-ed
Shadow = (Addr >> 3)
ASan virtual address space (no -pie)
0xffffffff
0x40000000
0x3fffffff
0x28000000
0x27ffffff
0x24000000
0x23ffffff
0x20000000
0x1fffffff
0x00000000
Application
Shadow
mprotect-ed
Shadow = (Addr >> 3)+ 0x20000000
void foo() {
char a[328];
<------------- CODE ------------->
Instrumenting stack
void foo() {
char rz1[32]; // 32-byte aligned
char a[328];
char rz2[24];
char rz3[32];
int *shadow = (&rz1 >> 3) + kOffset;
shadow[0] = 0xffffffff; // poison rz1
shadow[11] = 0xffffff00; // poison rz2
shadow[12] = 0xffffffff; // poison rz3
<------------- CODE ------------->
shadow[0] = shadow[11] = shadow[12] = 0;
}
Instrumenting stack
Instrumenting globals
int a;
struct {
int original;
char redzone[60];
} a; // 32-aligned
Run-time library
• Initializes shadow memory at startup
• Provides full malloc replacement
o Insert poisoned redzones around allocated memory
o Quarantine for free-ed memory
o Collect stack traces for every malloc/free
• Provides interceptors for functions like memset
• Prints error messages
ASan instrumentation: 8-byte access
char *shadow = addr >> 3;
if (*shadow)
ReportError(a);
*a = ...
*a = ...
ASan instrumentation: N-byte access (1, 2, 4)
char *shadow = addr >> 3;
if (*shadow &&
*shadow <= ((a&7)+N-1))
ReportError(a);
*a = ...
*a = ...
Instrumentation example (x86_64)
mov %rdi,%rax # address is in %rdi
shr $0x3,%rax # shift by 3
cmpb $0x0,0x7fff8000(%rax) # shadow ? 0
je 1f <foo+0x1f>
callq __asan_report_store8 # Report error
movq $0x1234,(%rdi) # original store
• 2x slowdown (Valgrind: 20x and more)
• 1.5x-3x memory overhead
• 1000+ bugs found in Chrome
• 1000+ bugs found in Google server apps
• 1000+ bugs everywhere else
o Firefox, FreeType, FFmpeg, WebRTC, libjpeg-turbo,
Perl, Vim, LLVM, GCC, MySQL
ASan marketing slide
ASan and Chrome
• Chrome was the first ASan user (May 2011)
• All existing tests are running with ASan
o Linux, Mac, ChromeOS
o Tree is closed on failure
• Fuzzing on massive scale (ClusterFuzz)
o Generate test cases, minimize, de-duplicate
o Find regression ranges, verify fixes
o Thousands CPUs running 24/7
• Over 1000 bugs found in 2 years
o Most may have security implications
o External researchers found 100+ bugs
ThreadSanitizer
data races
ThreadSanitizer
• Detects data races
• Compile-time instrumentation (LLVM, GCC)
• Run-time library
TSan report example: data race
void Thread1() { Global = 42; }
int main() {
pthread_create(&t, 0, Thread1, 0);
Global = 43;
...% clang -fsanitize=thread -g a.c -fPIE -pie &&
./a.out
WARNING: ThreadSanitizer: data race (pid=20373)
Write of size 4 at 0x7f... by thread 1:
#0 Thread1 a.c:1
Previous write of size 4 at 0x7f... by main thread:
#0 main a.c:4
Thread 1 (tid=20374, running) created at:
#0 pthread_create ??:0
#1 main a.c:3
Compiler instrumentation
void foo(int *p) {
*p = 42;
}
void foo(int *p) {
__tsan_func_entry(__builtin_return_address(0));
__tsan_write4(p);
*p = 42;
__tsan_func_exit()
}
Direct shadow mapping (64-bit Linux)
Application
0x7fffffffffff
0x7f0000000000
Protected
0x7effffffffff
0x200000000000
Shadow
0x1fffffffffff
0x180000000000
Protected
0x17ffffffffff
0x000000000000
Shadow = 4 * (Addr & kMask);
Shadow cell
An 8-byte shadow cell represents one memory
access:
o ~16 bits: TID (thread ID)
o ~42 bits: Epoch (scalar clock)
o 5 bits: position/size in 8-byte word
o 1 bit: IsWrite
Full information (no more dereferences)
TID
Epo
Pos
IsW
4 shadow cells per 8 app. bytes
TID
Epo
Pos
IsW
TID
Epo
Pos
IsW
TID
Epo
Pos
IsW
TID
Epo
Pos
IsW
Example: first access
T1
E1
0:2
W
Write in thread T1
Example: second access
T1
E1
0:2
W
T2
E2
4:8
R
Read in thread T2
Example: third access
T1
E1
0:2
W
T3
E3
0:4
R
T2
E2
4:8
R
Read in thread T3
Example: race?
T1
E1
0:2
W
T3
E3
0:4
R
T2
E2
4:8
R
Race if E1 does not
"happen-before" E3
Fast happens-before
• Constant-time operation
o Get TID and Epoch from the shadow cell
o 1 load from thread-local storage
o 1 comparison
• Similar to FastTrack (PLDI'09)
Stack trace for previous access
• Important to understand the report
• Per-thread cyclic buffer of events
o 64 bits per event (type + PC)
o Events: memory access, function entry/exit
o Information will be lost after some time
o Buffer size is configurable
• Replay the event buffer on report
o Unlimited number of frames
TSan overhead
• CPU: 4x-10x
• RAM: 5x-8x
Trophies
• 500+ races in Google server-side apps
(C++)
o Scales to huge apps
• 100+ races in Go programs
o 25+ bugs in Go stdlib
• Several races in OpenSSL
o 1 fixed, ~5 'benign'
• Several races in Chrome
o We've just started, more to come :)
Key advantages
• Speed
o > 10x faster than other tools
• Native support for atomics
o Hard or impossible to implement with binary
translation (Helgrind, Intel Inspector)
Limitations
• Only 64-bit Linux
• Hard to port to 32-bit platforms
o Small address space
o Relies on atomic 64-bit load/store
• Does not instrument:
o pre-built libraries
o inline assembly
MemorySanitizer
uninitialized memory reads (UMR)
MSan report example: UMR
int main(int argc, char **argv) {
int x[10];
x[0] = 1;
if (x[argc]) return 1;
...
% clang -fsanitize=memory -fPIE -pie a.c -g; ./a.out
WARNING: MemorySanitizer: UMR (uninitialized-memory-read)
#0 0x7ff6b05d9ca7 in main stack_umr.c:4
ORIGIN: stack allocation: x@main
Shadow memory
• Bit to bit shadow mapping
o 1 means 'poisoned' (uninitialized)
• Uninitialized memory:
o Returned by malloc
o Local stack objects (poisoned at function entry)
• Shadow is propagated through arithmetic
operations and memory writes
• Shadow is unpoisoned when constants are
stored
Direct 1:1 shadow mapping
Application
0x7fffffffffff
0x600000000000
Protected
0x5fffffffffff
0x400000000000
Shadow
0x3fffffffffff
0x200000000000
Protected
0x1fffffffffff
0x000000000000
Shadow = Addr - 0x400000000000;
Shadow propagation
• Reporting UMR on first read causes false positives
o E.g. copying struct {char x; int y;}
• Report UMR only on some uses (branch, syscall, etc)
o That's what Valgrind does
• Propagate shadow values through expressions
o A = B + C: A' = B' | C'
o A = B & C: A' = (B' & C') | (~B & C') | (B' & ~C)
o Approximation to minimize false positives/negatives
o Similar to Valgrind
• Function parameter/retval: shadow is stored in TLS
o Valgrind shadows registers/stack instead
Tracking origins
• Where was the poisoned memory allocated?
a = malloc() ...
b = malloc() ...
c = *a + *b ...
if (c) ... // UMR. Is 'a' guilty or 'b'?
• Valgrind --track-origins: propagate the origin of
the poisoned memory alongside the shadow
• MemorySanitizer: secondary shadow
o Origin-ID is 4 bytes, 1:1 mapping
o 2x additional slowdown
Secondary shadow (origin)
Application
0x7fffffffffff
0x600000000000
Origin
0x5fffffffffff
0x400000000000
Shadow
0x3fffffffffff
0x200000000000
Protected
0x1fffffffffff
0x000000000000
Origin = Addr - 0x200000000000;
• Without origins:
o CPU: 3x
o RAM: 2x
• With origins:
o CPU: 6x
o RAM: 3x
MSan overhead
Tricky part :(
• Missing any write instruction causes false reports
• Must monitor ALL stores in the program
o libc, libstdc++, syscalls, etc
Solutions:
• Instrumented libstdc++, wrappers for libc
o Works for many "console" apps, e.g. LLVM
• Instrument libraries at run-time
o DynamoRIO-based prototype (SLOW)
• Instrument libraries statically (is it possible?)
• Compile everything, wrap syscalls
o Will help AddressSanitizer/ThreadSanitizer too
MSan trophies
• Proprietary console app, 1.3 MLOC in C++
o Not tested with Valgrind previously
o 20+ unique bugs in < 2 hours
o Valgrind finds the same bugs in 24+ hours
o MSan gives better reports for stack memory
• Several bugs in LLVM
o Caught by regular LLVM bootstrap
• A few bugs in Chrome (just started)
o Have to use DynamoRIO module (MSanDR)
o 7x faster than Valgrind
• AddressSanitizer (memory corruption)
o A "must use" for everyone (C++)
o Linux, OSX, CrOS, Android
o i386, x86_64, ARM, PowerPC
o WIP: iOS, Windows, *BSD (?)
o Clang 3.1+ and GCC 4.8+
• ThreadSanitizer (races)
o A "must use" if you have threads (C++, Go)
o Only x86_64 Linux; Clang 3.2+ and GCC 4.8+
• MemorySanitizer (uses of uninitialized data)
o WIP, usable for "console" apps (C++)
o Only x86_64 Linux; Clang 3.3
Summary (all 3 tools)
Q&A
http://code.google.com/p/address-sanitizer/
http://code.google.com/p/thread-sanitizer/
http://code.google.com/p/memory-sanitizer/
ASan/MSan vs Valgrind (Memcheck)
Valgrind ASan MSan
Heap out-of-bounds YES YES NO
Stack out-of-bounds NO YES NO
Global out-of-bounds NO YES NO
Use-after-free YES YES NO
Use-after-return NO Sometimes NO
Uninitialized reads YES NO YES
CPU Overhead 10x-300x 1.5x-3x 3x
• Slowdowns will add up
o Bad for interactive or network apps
• Memory overheads will multiply
o ASan redzone vs TSan/MSan large shadow
• Not trivial to implement
Why not a single tool?

More Related Content

What's hot

20140531 serebryany lecture02_find_scary_cpp_bugs
20140531 serebryany lecture02_find_scary_cpp_bugs20140531 serebryany lecture02_find_scary_cpp_bugs
20140531 serebryany lecture02_find_scary_cpp_bugsComputer Science Club
 
20140531 serebryany lecture01_fantastic_cpp_bugs
20140531 serebryany lecture01_fantastic_cpp_bugs20140531 serebryany lecture01_fantastic_cpp_bugs
20140531 serebryany lecture01_fantastic_cpp_bugsComputer Science Club
 
Конверсия управляемых языков в неуправляемые
Конверсия управляемых языков в неуправляемыеКонверсия управляемых языков в неуправляемые
Конверсия управляемых языков в неуправляемыеPlatonov Sergey
 
Evgeniy Muralev, Mark Vince, Working with the compiler, not against it
Evgeniy Muralev, Mark Vince, Working with the compiler, not against itEvgeniy Muralev, Mark Vince, Working with the compiler, not against it
Evgeniy Muralev, Mark Vince, Working with the compiler, not against itSergey Platonov
 
Javascript engine performance
Javascript engine performanceJavascript engine performance
Javascript engine performanceDuoyi Wu
 
Kirk Shoop, Reactive programming in C++
Kirk Shoop, Reactive programming in C++Kirk Shoop, Reactive programming in C++
Kirk Shoop, Reactive programming in C++Sergey Platonov
 
Triton and Symbolic execution on GDB@DEF CON China
Triton and Symbolic execution on GDB@DEF CON ChinaTriton and Symbolic execution on GDB@DEF CON China
Triton and Symbolic execution on GDB@DEF CON ChinaWei-Bo Chen
 
Devirtualizing FinSpy
Devirtualizing FinSpyDevirtualizing FinSpy
Devirtualizing FinSpyjduart
 
Антон Бикинеев, Reflection in C++Next
Антон Бикинеев,  Reflection in C++NextАнтон Бикинеев,  Reflection in C++Next
Антон Бикинеев, Reflection in C++NextSergey Platonov
 
第二回CTF勉強会資料
第二回CTF勉強会資料第二回CTF勉強会資料
第二回CTF勉強会資料Asuka Nakajima
 
Best Bugs from Games: Fellow Programmers' Mistakes
Best Bugs from Games: Fellow Programmers' MistakesBest Bugs from Games: Fellow Programmers' Mistakes
Best Bugs from Games: Fellow Programmers' MistakesAndrey Karpov
 
Exploring the x64
Exploring the x64Exploring the x64
Exploring the x64FFRI, Inc.
 
C++20 the small things - Timur Doumler
C++20 the small things - Timur DoumlerC++20 the small things - Timur Doumler
C++20 the small things - Timur Doumlercorehard_by
 
Антон Бикинеев, Writing good std::future&lt; C++ >
Антон Бикинеев, Writing good std::future&lt; C++ >Антон Бикинеев, Writing good std::future&lt; C++ >
Антон Бикинеев, Writing good std::future&lt; C++ >Sergey Platonov
 
StackOverflow
StackOverflowStackOverflow
StackOverflowSusam Pal
 

What's hot (19)

20140531 serebryany lecture02_find_scary_cpp_bugs
20140531 serebryany lecture02_find_scary_cpp_bugs20140531 serebryany lecture02_find_scary_cpp_bugs
20140531 serebryany lecture02_find_scary_cpp_bugs
 
20140531 serebryany lecture01_fantastic_cpp_bugs
20140531 serebryany lecture01_fantastic_cpp_bugs20140531 serebryany lecture01_fantastic_cpp_bugs
20140531 serebryany lecture01_fantastic_cpp_bugs
 
Конверсия управляемых языков в неуправляемые
Конверсия управляемых языков в неуправляемыеКонверсия управляемых языков в неуправляемые
Конверсия управляемых языков в неуправляемые
 
Evgeniy Muralev, Mark Vince, Working with the compiler, not against it
Evgeniy Muralev, Mark Vince, Working with the compiler, not against itEvgeniy Muralev, Mark Vince, Working with the compiler, not against it
Evgeniy Muralev, Mark Vince, Working with the compiler, not against it
 
AA-sort with SSE4.1
AA-sort with SSE4.1AA-sort with SSE4.1
AA-sort with SSE4.1
 
Javascript engine performance
Javascript engine performanceJavascript engine performance
Javascript engine performance
 
Kirk Shoop, Reactive programming in C++
Kirk Shoop, Reactive programming in C++Kirk Shoop, Reactive programming in C++
Kirk Shoop, Reactive programming in C++
 
Triton and Symbolic execution on GDB@DEF CON China
Triton and Symbolic execution on GDB@DEF CON ChinaTriton and Symbolic execution on GDB@DEF CON China
Triton and Symbolic execution on GDB@DEF CON China
 
Devirtualizing FinSpy
Devirtualizing FinSpyDevirtualizing FinSpy
Devirtualizing FinSpy
 
Антон Бикинеев, Reflection in C++Next
Антон Бикинеев,  Reflection in C++NextАнтон Бикинеев,  Reflection in C++Next
Антон Бикинеев, Reflection in C++Next
 
第二回CTF勉強会資料
第二回CTF勉強会資料第二回CTF勉強会資料
第二回CTF勉強会資料
 
Best Bugs from Games: Fellow Programmers' Mistakes
Best Bugs from Games: Fellow Programmers' MistakesBest Bugs from Games: Fellow Programmers' Mistakes
Best Bugs from Games: Fellow Programmers' Mistakes
 
Exploring the x64
Exploring the x64Exploring the x64
Exploring the x64
 
Tiramisu概要
Tiramisu概要Tiramisu概要
Tiramisu概要
 
C++20 the small things - Timur Doumler
C++20 the small things - Timur DoumlerC++20 the small things - Timur Doumler
C++20 the small things - Timur Doumler
 
Антон Бикинеев, Writing good std::future&lt; C++ >
Антон Бикинеев, Writing good std::future&lt; C++ >Антон Бикинеев, Writing good std::future&lt; C++ >
Антон Бикинеев, Writing good std::future&lt; C++ >
 
ROP
ROPROP
ROP
 
Faster Python, FOSDEM
Faster Python, FOSDEMFaster Python, FOSDEM
Faster Python, FOSDEM
 
StackOverflow
StackOverflowStackOverflow
StackOverflow
 

Similar to AddressSanitizer and ThreadSanitizer: Find bugs and vulnerabilities in Chrome browser and server apps

A Speculative Technique for Auto-Memoization Processor with Multithreading
A Speculative Technique for Auto-Memoization Processor with MultithreadingA Speculative Technique for Auto-Memoization Processor with Multithreading
A Speculative Technique for Auto-Memoization Processor with MultithreadingMatsuo and Tsumura lab.
 
Happy To Use SIMD
Happy To Use SIMDHappy To Use SIMD
Happy To Use SIMDWei-Ta Wang
 
C Programming Training in Ambala ! Batra Computer Centre
C Programming Training in Ambala ! Batra Computer CentreC Programming Training in Ambala ! Batra Computer Centre
C Programming Training in Ambala ! Batra Computer Centrejatin batra
 
Open Source Systems Performance
Open Source Systems PerformanceOpen Source Systems Performance
Open Source Systems PerformanceBrendan Gregg
 
Instruction Set Architecture
Instruction  Set ArchitectureInstruction  Set Architecture
Instruction Set ArchitectureHaris456
 
Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)Ontico
 
Finding Xori: Malware Analysis Triage with Automated Disassembly
Finding Xori: Malware Analysis Triage with Automated DisassemblyFinding Xori: Malware Analysis Triage with Automated Disassembly
Finding Xori: Malware Analysis Triage with Automated DisassemblyPriyanka Aash
 
Troubleshooting Linux Kernel Modules And Device Drivers
Troubleshooting Linux Kernel Modules And Device DriversTroubleshooting Linux Kernel Modules And Device Drivers
Troubleshooting Linux Kernel Modules And Device DriversSatpal Parmar
 
Troubleshooting linux-kernel-modules-and-device-drivers-1233050713693744-1
Troubleshooting linux-kernel-modules-and-device-drivers-1233050713693744-1Troubleshooting linux-kernel-modules-and-device-drivers-1233050713693744-1
Troubleshooting linux-kernel-modules-and-device-drivers-1233050713693744-1Jagadisha Maiya
 
Debugging Ruby Systems
Debugging Ruby SystemsDebugging Ruby Systems
Debugging Ruby SystemsEngine Yard
 
General Purpose Computing using Graphics Hardware
General Purpose Computing using Graphics HardwareGeneral Purpose Computing using Graphics Hardware
General Purpose Computing using Graphics HardwareDaniel Blezek
 
TDOH x 台科 pwn課程
TDOH x 台科 pwn課程TDOH x 台科 pwn課程
TDOH x 台科 pwn課程Weber Tsai
 
Sergi Álvarez & Roi Martín - Radare2 Preview [RootedCON 2010]
Sergi Álvarez & Roi Martín - Radare2 Preview [RootedCON 2010]Sergi Álvarez & Roi Martín - Radare2 Preview [RootedCON 2010]
Sergi Álvarez & Roi Martín - Radare2 Preview [RootedCON 2010]RootedCON
 
AllBits presentation - Lower Level SW Security
AllBits presentation - Lower Level SW SecurityAllBits presentation - Lower Level SW Security
AllBits presentation - Lower Level SW SecurityAllBits BVBA (freelancer)
 
Getting started cpp full
Getting started cpp   fullGetting started cpp   full
Getting started cpp fullVõ Hòa
 
Finding Xori: Malware Analysis Triage with Automated Disassembly
Finding Xori: Malware Analysis Triage with Automated DisassemblyFinding Xori: Malware Analysis Triage with Automated Disassembly
Finding Xori: Malware Analysis Triage with Automated DisassemblyPriyanka Aash
 
How Triton can help to reverse virtual machine based software protections
How Triton can help to reverse virtual machine based software protectionsHow Triton can help to reverse virtual machine based software protections
How Triton can help to reverse virtual machine based software protectionsJonathan Salwan
 

Similar to AddressSanitizer and ThreadSanitizer: Find bugs and vulnerabilities in Chrome browser and server apps (20)

A Speculative Technique for Auto-Memoization Processor with Multithreading
A Speculative Technique for Auto-Memoization Processor with MultithreadingA Speculative Technique for Auto-Memoization Processor with Multithreading
A Speculative Technique for Auto-Memoization Processor with Multithreading
 
Happy To Use SIMD
Happy To Use SIMDHappy To Use SIMD
Happy To Use SIMD
 
C Programming Training in Ambala ! Batra Computer Centre
C Programming Training in Ambala ! Batra Computer CentreC Programming Training in Ambala ! Batra Computer Centre
C Programming Training in Ambala ! Batra Computer Centre
 
Open Source Systems Performance
Open Source Systems PerformanceOpen Source Systems Performance
Open Source Systems Performance
 
Instruction Set Architecture
Instruction  Set ArchitectureInstruction  Set Architecture
Instruction Set Architecture
 
Lec05
Lec05Lec05
Lec05
 
test
testtest
test
 
Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)
 
Finding Xori: Malware Analysis Triage with Automated Disassembly
Finding Xori: Malware Analysis Triage with Automated DisassemblyFinding Xori: Malware Analysis Triage with Automated Disassembly
Finding Xori: Malware Analysis Triage with Automated Disassembly
 
Buffer Overflow Attacks
Buffer Overflow AttacksBuffer Overflow Attacks
Buffer Overflow Attacks
 
Troubleshooting Linux Kernel Modules And Device Drivers
Troubleshooting Linux Kernel Modules And Device DriversTroubleshooting Linux Kernel Modules And Device Drivers
Troubleshooting Linux Kernel Modules And Device Drivers
 
Troubleshooting linux-kernel-modules-and-device-drivers-1233050713693744-1
Troubleshooting linux-kernel-modules-and-device-drivers-1233050713693744-1Troubleshooting linux-kernel-modules-and-device-drivers-1233050713693744-1
Troubleshooting linux-kernel-modules-and-device-drivers-1233050713693744-1
 
Debugging Ruby Systems
Debugging Ruby SystemsDebugging Ruby Systems
Debugging Ruby Systems
 
General Purpose Computing using Graphics Hardware
General Purpose Computing using Graphics HardwareGeneral Purpose Computing using Graphics Hardware
General Purpose Computing using Graphics Hardware
 
TDOH x 台科 pwn課程
TDOH x 台科 pwn課程TDOH x 台科 pwn課程
TDOH x 台科 pwn課程
 
Sergi Álvarez & Roi Martín - Radare2 Preview [RootedCON 2010]
Sergi Álvarez & Roi Martín - Radare2 Preview [RootedCON 2010]Sergi Álvarez & Roi Martín - Radare2 Preview [RootedCON 2010]
Sergi Álvarez & Roi Martín - Radare2 Preview [RootedCON 2010]
 
AllBits presentation - Lower Level SW Security
AllBits presentation - Lower Level SW SecurityAllBits presentation - Lower Level SW Security
AllBits presentation - Lower Level SW Security
 
Getting started cpp full
Getting started cpp   fullGetting started cpp   full
Getting started cpp full
 
Finding Xori: Malware Analysis Triage with Automated Disassembly
Finding Xori: Malware Analysis Triage with Automated DisassemblyFinding Xori: Malware Analysis Triage with Automated Disassembly
Finding Xori: Malware Analysis Triage with Automated Disassembly
 
How Triton can help to reverse virtual machine based software protections
How Triton can help to reverse virtual machine based software protectionsHow Triton can help to reverse virtual machine based software protections
How Triton can help to reverse virtual machine based software protections
 

More from Yandex

Предсказание оттока игроков из World of Tanks
Предсказание оттока игроков из World of TanksПредсказание оттока игроков из World of Tanks
Предсказание оттока игроков из World of TanksYandex
 
Как принять/организовать работу по поисковой оптимизации сайта, Сергей Царик,...
Как принять/организовать работу по поисковой оптимизации сайта, Сергей Царик,...Как принять/организовать работу по поисковой оптимизации сайта, Сергей Царик,...
Как принять/организовать работу по поисковой оптимизации сайта, Сергей Царик,...Yandex
 
Структурированные данные, Юлия Тихоход, лекция в Школе вебмастеров Яндекса
Структурированные данные, Юлия Тихоход, лекция в Школе вебмастеров ЯндексаСтруктурированные данные, Юлия Тихоход, лекция в Школе вебмастеров Яндекса
Структурированные данные, Юлия Тихоход, лекция в Школе вебмастеров ЯндексаYandex
 
Представление сайта в поиске, Сергей Лысенко, лекция в Школе вебмастеров Яндекса
Представление сайта в поиске, Сергей Лысенко, лекция в Школе вебмастеров ЯндексаПредставление сайта в поиске, Сергей Лысенко, лекция в Школе вебмастеров Яндекса
Представление сайта в поиске, Сергей Лысенко, лекция в Школе вебмастеров ЯндексаYandex
 
Плохие методы продвижения сайта, Екатерины Гладких, лекция в Школе вебмастеро...
Плохие методы продвижения сайта, Екатерины Гладких, лекция в Школе вебмастеро...Плохие методы продвижения сайта, Екатерины Гладких, лекция в Школе вебмастеро...
Плохие методы продвижения сайта, Екатерины Гладких, лекция в Школе вебмастеро...Yandex
 
Основные принципы ранжирования, Сергей Царик и Антон Роменский, лекция в Школ...
Основные принципы ранжирования, Сергей Царик и Антон Роменский, лекция в Школ...Основные принципы ранжирования, Сергей Царик и Антон Роменский, лекция в Школ...
Основные принципы ранжирования, Сергей Царик и Антон Роменский, лекция в Школ...Yandex
 
Основные принципы индексирования сайта, Александр Смирнов, лекция в Школе веб...
Основные принципы индексирования сайта, Александр Смирнов, лекция в Школе веб...Основные принципы индексирования сайта, Александр Смирнов, лекция в Школе веб...
Основные принципы индексирования сайта, Александр Смирнов, лекция в Школе веб...Yandex
 
Мобильное приложение: как и зачем, Александр Лукин, лекция в Школе вебмастеро...
Мобильное приложение: как и зачем, Александр Лукин, лекция в Школе вебмастеро...Мобильное приложение: как и зачем, Александр Лукин, лекция в Школе вебмастеро...
Мобильное приложение: как и зачем, Александр Лукин, лекция в Школе вебмастеро...Yandex
 
Сайты на мобильных устройствах, Олег Ножичкин, лекция в Школе вебмастеров Янд...
Сайты на мобильных устройствах, Олег Ножичкин, лекция в Школе вебмастеров Янд...Сайты на мобильных устройствах, Олег Ножичкин, лекция в Школе вебмастеров Янд...
Сайты на мобильных устройствах, Олег Ножичкин, лекция в Школе вебмастеров Янд...Yandex
 
Качественная аналитика сайта, Юрий Батиевский, лекция в Школе вебмастеров Янд...
Качественная аналитика сайта, Юрий Батиевский, лекция в Школе вебмастеров Янд...Качественная аналитика сайта, Юрий Батиевский, лекция в Школе вебмастеров Янд...
Качественная аналитика сайта, Юрий Батиевский, лекция в Школе вебмастеров Янд...Yandex
 
Что можно и что нужно измерять на сайте, Петр Аброськин, лекция в Школе вебма...
Что можно и что нужно измерять на сайте, Петр Аброськин, лекция в Школе вебма...Что можно и что нужно измерять на сайте, Петр Аброськин, лекция в Школе вебма...
Что можно и что нужно измерять на сайте, Петр Аброськин, лекция в Школе вебма...Yandex
 
Как правильно поставить ТЗ на создание сайта, Алексей Бородкин, лекция в Школ...
Как правильно поставить ТЗ на создание сайта, Алексей Бородкин, лекция в Школ...Как правильно поставить ТЗ на создание сайта, Алексей Бородкин, лекция в Школ...
Как правильно поставить ТЗ на создание сайта, Алексей Бородкин, лекция в Школ...Yandex
 
Как защитить свой сайт, Пётр Волков, лекция в Школе вебмастеров
Как защитить свой сайт, Пётр Волков, лекция в Школе вебмастеровКак защитить свой сайт, Пётр Волков, лекция в Школе вебмастеров
Как защитить свой сайт, Пётр Волков, лекция в Школе вебмастеровYandex
 
Как правильно составить структуру сайта, Дмитрий Сатин, лекция в Школе вебмас...
Как правильно составить структуру сайта, Дмитрий Сатин, лекция в Школе вебмас...Как правильно составить структуру сайта, Дмитрий Сатин, лекция в Школе вебмас...
Как правильно составить структуру сайта, Дмитрий Сатин, лекция в Школе вебмас...Yandex
 
Технические особенности создания сайта, Дмитрий Васильева, лекция в Школе веб...
Технические особенности создания сайта, Дмитрий Васильева, лекция в Школе веб...Технические особенности создания сайта, Дмитрий Васильева, лекция в Школе веб...
Технические особенности создания сайта, Дмитрий Васильева, лекция в Школе веб...Yandex
 
Конструкторы для отдельных элементов сайта, Елена Першина, лекция в Школе веб...
Конструкторы для отдельных элементов сайта, Елена Першина, лекция в Школе веб...Конструкторы для отдельных элементов сайта, Елена Першина, лекция в Школе веб...
Конструкторы для отдельных элементов сайта, Елена Першина, лекция в Школе веб...Yandex
 
Контент для интернет-магазинов, Катерина Ерошина, лекция в Школе вебмастеров ...
Контент для интернет-магазинов, Катерина Ерошина, лекция в Школе вебмастеров ...Контент для интернет-магазинов, Катерина Ерошина, лекция в Школе вебмастеров ...
Контент для интернет-магазинов, Катерина Ерошина, лекция в Школе вебмастеров ...Yandex
 
Как написать хороший текст для сайта, Катерина Ерошина, лекция в Школе вебмас...
Как написать хороший текст для сайта, Катерина Ерошина, лекция в Школе вебмас...Как написать хороший текст для сайта, Катерина Ерошина, лекция в Школе вебмас...
Как написать хороший текст для сайта, Катерина Ерошина, лекция в Школе вебмас...Yandex
 
Usability и дизайн - как не помешать пользователю, Алексей Иванов, лекция в Ш...
Usability и дизайн - как не помешать пользователю, Алексей Иванов, лекция в Ш...Usability и дизайн - как не помешать пользователю, Алексей Иванов, лекция в Ш...
Usability и дизайн - как не помешать пользователю, Алексей Иванов, лекция в Ш...Yandex
 
Cайт. Зачем он и каким должен быть, Алексей Иванов, лекция в Школе вебмастеро...
Cайт. Зачем он и каким должен быть, Алексей Иванов, лекция в Школе вебмастеро...Cайт. Зачем он и каким должен быть, Алексей Иванов, лекция в Школе вебмастеро...
Cайт. Зачем он и каким должен быть, Алексей Иванов, лекция в Школе вебмастеро...Yandex
 

More from Yandex (20)

Предсказание оттока игроков из World of Tanks
Предсказание оттока игроков из World of TanksПредсказание оттока игроков из World of Tanks
Предсказание оттока игроков из World of Tanks
 
Как принять/организовать работу по поисковой оптимизации сайта, Сергей Царик,...
Как принять/организовать работу по поисковой оптимизации сайта, Сергей Царик,...Как принять/организовать работу по поисковой оптимизации сайта, Сергей Царик,...
Как принять/организовать работу по поисковой оптимизации сайта, Сергей Царик,...
 
Структурированные данные, Юлия Тихоход, лекция в Школе вебмастеров Яндекса
Структурированные данные, Юлия Тихоход, лекция в Школе вебмастеров ЯндексаСтруктурированные данные, Юлия Тихоход, лекция в Школе вебмастеров Яндекса
Структурированные данные, Юлия Тихоход, лекция в Школе вебмастеров Яндекса
 
Представление сайта в поиске, Сергей Лысенко, лекция в Школе вебмастеров Яндекса
Представление сайта в поиске, Сергей Лысенко, лекция в Школе вебмастеров ЯндексаПредставление сайта в поиске, Сергей Лысенко, лекция в Школе вебмастеров Яндекса
Представление сайта в поиске, Сергей Лысенко, лекция в Школе вебмастеров Яндекса
 
Плохие методы продвижения сайта, Екатерины Гладких, лекция в Школе вебмастеро...
Плохие методы продвижения сайта, Екатерины Гладких, лекция в Школе вебмастеро...Плохие методы продвижения сайта, Екатерины Гладких, лекция в Школе вебмастеро...
Плохие методы продвижения сайта, Екатерины Гладких, лекция в Школе вебмастеро...
 
Основные принципы ранжирования, Сергей Царик и Антон Роменский, лекция в Школ...
Основные принципы ранжирования, Сергей Царик и Антон Роменский, лекция в Школ...Основные принципы ранжирования, Сергей Царик и Антон Роменский, лекция в Школ...
Основные принципы ранжирования, Сергей Царик и Антон Роменский, лекция в Школ...
 
Основные принципы индексирования сайта, Александр Смирнов, лекция в Школе веб...
Основные принципы индексирования сайта, Александр Смирнов, лекция в Школе веб...Основные принципы индексирования сайта, Александр Смирнов, лекция в Школе веб...
Основные принципы индексирования сайта, Александр Смирнов, лекция в Школе веб...
 
Мобильное приложение: как и зачем, Александр Лукин, лекция в Школе вебмастеро...
Мобильное приложение: как и зачем, Александр Лукин, лекция в Школе вебмастеро...Мобильное приложение: как и зачем, Александр Лукин, лекция в Школе вебмастеро...
Мобильное приложение: как и зачем, Александр Лукин, лекция в Школе вебмастеро...
 
Сайты на мобильных устройствах, Олег Ножичкин, лекция в Школе вебмастеров Янд...
Сайты на мобильных устройствах, Олег Ножичкин, лекция в Школе вебмастеров Янд...Сайты на мобильных устройствах, Олег Ножичкин, лекция в Школе вебмастеров Янд...
Сайты на мобильных устройствах, Олег Ножичкин, лекция в Школе вебмастеров Янд...
 
Качественная аналитика сайта, Юрий Батиевский, лекция в Школе вебмастеров Янд...
Качественная аналитика сайта, Юрий Батиевский, лекция в Школе вебмастеров Янд...Качественная аналитика сайта, Юрий Батиевский, лекция в Школе вебмастеров Янд...
Качественная аналитика сайта, Юрий Батиевский, лекция в Школе вебмастеров Янд...
 
Что можно и что нужно измерять на сайте, Петр Аброськин, лекция в Школе вебма...
Что можно и что нужно измерять на сайте, Петр Аброськин, лекция в Школе вебма...Что можно и что нужно измерять на сайте, Петр Аброськин, лекция в Школе вебма...
Что можно и что нужно измерять на сайте, Петр Аброськин, лекция в Школе вебма...
 
Как правильно поставить ТЗ на создание сайта, Алексей Бородкин, лекция в Школ...
Как правильно поставить ТЗ на создание сайта, Алексей Бородкин, лекция в Школ...Как правильно поставить ТЗ на создание сайта, Алексей Бородкин, лекция в Школ...
Как правильно поставить ТЗ на создание сайта, Алексей Бородкин, лекция в Школ...
 
Как защитить свой сайт, Пётр Волков, лекция в Школе вебмастеров
Как защитить свой сайт, Пётр Волков, лекция в Школе вебмастеровКак защитить свой сайт, Пётр Волков, лекция в Школе вебмастеров
Как защитить свой сайт, Пётр Волков, лекция в Школе вебмастеров
 
Как правильно составить структуру сайта, Дмитрий Сатин, лекция в Школе вебмас...
Как правильно составить структуру сайта, Дмитрий Сатин, лекция в Школе вебмас...Как правильно составить структуру сайта, Дмитрий Сатин, лекция в Школе вебмас...
Как правильно составить структуру сайта, Дмитрий Сатин, лекция в Школе вебмас...
 
Технические особенности создания сайта, Дмитрий Васильева, лекция в Школе веб...
Технические особенности создания сайта, Дмитрий Васильева, лекция в Школе веб...Технические особенности создания сайта, Дмитрий Васильева, лекция в Школе веб...
Технические особенности создания сайта, Дмитрий Васильева, лекция в Школе веб...
 
Конструкторы для отдельных элементов сайта, Елена Першина, лекция в Школе веб...
Конструкторы для отдельных элементов сайта, Елена Першина, лекция в Школе веб...Конструкторы для отдельных элементов сайта, Елена Першина, лекция в Школе веб...
Конструкторы для отдельных элементов сайта, Елена Першина, лекция в Школе веб...
 
Контент для интернет-магазинов, Катерина Ерошина, лекция в Школе вебмастеров ...
Контент для интернет-магазинов, Катерина Ерошина, лекция в Школе вебмастеров ...Контент для интернет-магазинов, Катерина Ерошина, лекция в Школе вебмастеров ...
Контент для интернет-магазинов, Катерина Ерошина, лекция в Школе вебмастеров ...
 
Как написать хороший текст для сайта, Катерина Ерошина, лекция в Школе вебмас...
Как написать хороший текст для сайта, Катерина Ерошина, лекция в Школе вебмас...Как написать хороший текст для сайта, Катерина Ерошина, лекция в Школе вебмас...
Как написать хороший текст для сайта, Катерина Ерошина, лекция в Школе вебмас...
 
Usability и дизайн - как не помешать пользователю, Алексей Иванов, лекция в Ш...
Usability и дизайн - как не помешать пользователю, Алексей Иванов, лекция в Ш...Usability и дизайн - как не помешать пользователю, Алексей Иванов, лекция в Ш...
Usability и дизайн - как не помешать пользователю, Алексей Иванов, лекция в Ш...
 
Cайт. Зачем он и каким должен быть, Алексей Иванов, лекция в Школе вебмастеро...
Cайт. Зачем он и каким должен быть, Алексей Иванов, лекция в Школе вебмастеро...Cайт. Зачем он и каким должен быть, Алексей Иванов, лекция в Школе вебмастеро...
Cайт. Зачем он и каким должен быть, Алексей Иванов, лекция в Школе вебмастеро...
 

Recently uploaded

Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 

Recently uploaded (20)

Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 

AddressSanitizer and ThreadSanitizer: Find bugs and vulnerabilities in Chrome browser and server apps

  • 1. AddressSanitizer и ThreadSanitizer: Поиск ошибок и уязвимостей в браузере Chrome и серверных приложениях Костя Серебряный, Google 30 Мая 2013
  • 2. • AddressSanitizer (aka ASan) o detects use-after-free and buffer overflows (C++) • ThreadSanitizer (aka TSan) o detects data races (C++ & Go) • MemorySanitizer (aka MSan) o detects uninitialized memory reads (C++) • Similar tools, find different kinds of bugs Agenda
  • 4. AddressSanitizer overview • Finds o buffer overflows (stack, heap, globals) o use-after-free o some more • Compiler module (LLVM, GCC) • Run-time library
  • 5. int global_array[100] = {-1}; int main(int argc, char **argv) { return global_array[argc + 100]; // BOOM } % clang++ -O1 -fsanitize=address a.cc ; ./a.out ==10538== ERROR: AddressSanitizer global-buffer-overflow READ of size 4 at 0x000000415354 thread T0 #0 0x402481 in main a.cc:3 #1 0x7f0a1c295c4d in __libc_start_main ??:0 #2 0x402379 in _start ??:0 0x000000415354 is located 4 bytes to the right of global variable 'global_array' (0x4151c0) of size 400 ASan report example: global-buffer-overflow
  • 6. int main(int argc, char **argv) { int stack_array[100]; stack_array[1] = 0; return stack_array[argc + 100]; // BOOM } % clang++ -O1 -fsanitize=address a.cc; ./a.out ==10589== ERROR: AddressSanitizer stack-buffer-overflow READ of size 4 at 0x7f5620d981b4 thread T0 #0 0x4024e8 in main a.cc:4 Address 0x7f5620d981b4 is located at offset 436 in frame <main> of T0's stack: This frame has 1 object(s): [32, 432) 'stack_array' ASan report example: stack-buffer-overflow
  • 7. int main(int argc, char **argv) { int *array = new int[100]; int res = array[argc + 100]; // BOOM delete [] array; return res; } % clang++ -O1 -fsanitize=address a.cc; ./a.out ==10565== ERROR: AddressSanitizer heap-buffer-overflow READ of size 4 at 0x7fe4b0c76214 thread T0 #0 0x40246f in main a.cc:3 0x7fe4b0c76214 is located 4 bytes to the right of 400-byte region [0x7fe..., 0x7fe...) allocated by thread T0 here: #0 0x402c36 in operator new[](unsigned long) #1 0x402422 in main a.cc:2 ASan report example: heap-buffer-overflow
  • 8. ASan report example: use-after-free int main(int argc, char **argv) { int *array = new int[100]; delete [] array; return array[argc]; // BOOM } % clang++ -O1 -fsanitize=address a.cc && ./a.out ==30226== ERROR: AddressSanitizer heap-use-after-free READ of size 4 at 0x7faa07fce084 thread T0 #0 0x40433c in main a.cc:4 0x7faa07fce084 is located 4 bytes inside of 400-byte region freed by thread T0 here: #0 0x4058fd in operator delete[](void*) _asan_rtl_ #1 0x404303 in main a.cc:3 previously allocated by thread T0 here: #0 0x405579 in operator new[](unsigned long) _asan_rtl_
  • 9. Any aligned 8 bytes may have 9 states: N good bytes and 8 - N bad (0<=N<=8) 0 7 6 5 4 3 2 1 -1 Good byte Bad byte Shadow value ASan shadow byte
  • 10. ASan virtual address space (-pie) 0xffffffff 0x20000000 0x1fffffff 0x04000000 0x03ffffff 0x00000000 Application Shadow mprotect-ed Shadow = (Addr >> 3)
  • 11. ASan virtual address space (no -pie) 0xffffffff 0x40000000 0x3fffffff 0x28000000 0x27ffffff 0x24000000 0x23ffffff 0x20000000 0x1fffffff 0x00000000 Application Shadow mprotect-ed Shadow = (Addr >> 3)+ 0x20000000
  • 12. void foo() { char a[328]; <------------- CODE -------------> Instrumenting stack
  • 13. void foo() { char rz1[32]; // 32-byte aligned char a[328]; char rz2[24]; char rz3[32]; int *shadow = (&rz1 >> 3) + kOffset; shadow[0] = 0xffffffff; // poison rz1 shadow[11] = 0xffffff00; // poison rz2 shadow[12] = 0xffffffff; // poison rz3 <------------- CODE -------------> shadow[0] = shadow[11] = shadow[12] = 0; } Instrumenting stack
  • 14. Instrumenting globals int a; struct { int original; char redzone[60]; } a; // 32-aligned
  • 15. Run-time library • Initializes shadow memory at startup • Provides full malloc replacement o Insert poisoned redzones around allocated memory o Quarantine for free-ed memory o Collect stack traces for every malloc/free • Provides interceptors for functions like memset • Prints error messages
  • 16. ASan instrumentation: 8-byte access char *shadow = addr >> 3; if (*shadow) ReportError(a); *a = ... *a = ...
  • 17. ASan instrumentation: N-byte access (1, 2, 4) char *shadow = addr >> 3; if (*shadow && *shadow <= ((a&7)+N-1)) ReportError(a); *a = ... *a = ...
  • 18. Instrumentation example (x86_64) mov %rdi,%rax # address is in %rdi shr $0x3,%rax # shift by 3 cmpb $0x0,0x7fff8000(%rax) # shadow ? 0 je 1f <foo+0x1f> callq __asan_report_store8 # Report error movq $0x1234,(%rdi) # original store
  • 19. • 2x slowdown (Valgrind: 20x and more) • 1.5x-3x memory overhead • 1000+ bugs found in Chrome • 1000+ bugs found in Google server apps • 1000+ bugs everywhere else o Firefox, FreeType, FFmpeg, WebRTC, libjpeg-turbo, Perl, Vim, LLVM, GCC, MySQL ASan marketing slide
  • 20. ASan and Chrome • Chrome was the first ASan user (May 2011) • All existing tests are running with ASan o Linux, Mac, ChromeOS o Tree is closed on failure • Fuzzing on massive scale (ClusterFuzz) o Generate test cases, minimize, de-duplicate o Find regression ranges, verify fixes o Thousands CPUs running 24/7 • Over 1000 bugs found in 2 years o Most may have security implications o External researchers found 100+ bugs
  • 22. ThreadSanitizer • Detects data races • Compile-time instrumentation (LLVM, GCC) • Run-time library
  • 23. TSan report example: data race void Thread1() { Global = 42; } int main() { pthread_create(&t, 0, Thread1, 0); Global = 43; ...% clang -fsanitize=thread -g a.c -fPIE -pie && ./a.out WARNING: ThreadSanitizer: data race (pid=20373) Write of size 4 at 0x7f... by thread 1: #0 Thread1 a.c:1 Previous write of size 4 at 0x7f... by main thread: #0 main a.c:4 Thread 1 (tid=20374, running) created at: #0 pthread_create ??:0 #1 main a.c:3
  • 24. Compiler instrumentation void foo(int *p) { *p = 42; } void foo(int *p) { __tsan_func_entry(__builtin_return_address(0)); __tsan_write4(p); *p = 42; __tsan_func_exit() }
  • 25. Direct shadow mapping (64-bit Linux) Application 0x7fffffffffff 0x7f0000000000 Protected 0x7effffffffff 0x200000000000 Shadow 0x1fffffffffff 0x180000000000 Protected 0x17ffffffffff 0x000000000000 Shadow = 4 * (Addr & kMask);
  • 26. Shadow cell An 8-byte shadow cell represents one memory access: o ~16 bits: TID (thread ID) o ~42 bits: Epoch (scalar clock) o 5 bits: position/size in 8-byte word o 1 bit: IsWrite Full information (no more dereferences) TID Epo Pos IsW
  • 27. 4 shadow cells per 8 app. bytes TID Epo Pos IsW TID Epo Pos IsW TID Epo Pos IsW TID Epo Pos IsW
  • 32. Fast happens-before • Constant-time operation o Get TID and Epoch from the shadow cell o 1 load from thread-local storage o 1 comparison • Similar to FastTrack (PLDI'09)
  • 33. Stack trace for previous access • Important to understand the report • Per-thread cyclic buffer of events o 64 bits per event (type + PC) o Events: memory access, function entry/exit o Information will be lost after some time o Buffer size is configurable • Replay the event buffer on report o Unlimited number of frames
  • 34. TSan overhead • CPU: 4x-10x • RAM: 5x-8x
  • 35. Trophies • 500+ races in Google server-side apps (C++) o Scales to huge apps • 100+ races in Go programs o 25+ bugs in Go stdlib • Several races in OpenSSL o 1 fixed, ~5 'benign' • Several races in Chrome o We've just started, more to come :)
  • 36. Key advantages • Speed o > 10x faster than other tools • Native support for atomics o Hard or impossible to implement with binary translation (Helgrind, Intel Inspector)
  • 37. Limitations • Only 64-bit Linux • Hard to port to 32-bit platforms o Small address space o Relies on atomic 64-bit load/store • Does not instrument: o pre-built libraries o inline assembly
  • 39. MSan report example: UMR int main(int argc, char **argv) { int x[10]; x[0] = 1; if (x[argc]) return 1; ... % clang -fsanitize=memory -fPIE -pie a.c -g; ./a.out WARNING: MemorySanitizer: UMR (uninitialized-memory-read) #0 0x7ff6b05d9ca7 in main stack_umr.c:4 ORIGIN: stack allocation: x@main
  • 40. Shadow memory • Bit to bit shadow mapping o 1 means 'poisoned' (uninitialized) • Uninitialized memory: o Returned by malloc o Local stack objects (poisoned at function entry) • Shadow is propagated through arithmetic operations and memory writes • Shadow is unpoisoned when constants are stored
  • 41. Direct 1:1 shadow mapping Application 0x7fffffffffff 0x600000000000 Protected 0x5fffffffffff 0x400000000000 Shadow 0x3fffffffffff 0x200000000000 Protected 0x1fffffffffff 0x000000000000 Shadow = Addr - 0x400000000000;
  • 42. Shadow propagation • Reporting UMR on first read causes false positives o E.g. copying struct {char x; int y;} • Report UMR only on some uses (branch, syscall, etc) o That's what Valgrind does • Propagate shadow values through expressions o A = B + C: A' = B' | C' o A = B & C: A' = (B' & C') | (~B & C') | (B' & ~C) o Approximation to minimize false positives/negatives o Similar to Valgrind • Function parameter/retval: shadow is stored in TLS o Valgrind shadows registers/stack instead
  • 43. Tracking origins • Where was the poisoned memory allocated? a = malloc() ... b = malloc() ... c = *a + *b ... if (c) ... // UMR. Is 'a' guilty or 'b'? • Valgrind --track-origins: propagate the origin of the poisoned memory alongside the shadow • MemorySanitizer: secondary shadow o Origin-ID is 4 bytes, 1:1 mapping o 2x additional slowdown
  • 45. • Without origins: o CPU: 3x o RAM: 2x • With origins: o CPU: 6x o RAM: 3x MSan overhead
  • 46. Tricky part :( • Missing any write instruction causes false reports • Must monitor ALL stores in the program o libc, libstdc++, syscalls, etc Solutions: • Instrumented libstdc++, wrappers for libc o Works for many "console" apps, e.g. LLVM • Instrument libraries at run-time o DynamoRIO-based prototype (SLOW) • Instrument libraries statically (is it possible?) • Compile everything, wrap syscalls o Will help AddressSanitizer/ThreadSanitizer too
  • 47. MSan trophies • Proprietary console app, 1.3 MLOC in C++ o Not tested with Valgrind previously o 20+ unique bugs in < 2 hours o Valgrind finds the same bugs in 24+ hours o MSan gives better reports for stack memory • Several bugs in LLVM o Caught by regular LLVM bootstrap • A few bugs in Chrome (just started) o Have to use DynamoRIO module (MSanDR) o 7x faster than Valgrind
  • 48. • AddressSanitizer (memory corruption) o A "must use" for everyone (C++) o Linux, OSX, CrOS, Android o i386, x86_64, ARM, PowerPC o WIP: iOS, Windows, *BSD (?) o Clang 3.1+ and GCC 4.8+ • ThreadSanitizer (races) o A "must use" if you have threads (C++, Go) o Only x86_64 Linux; Clang 3.2+ and GCC 4.8+ • MemorySanitizer (uses of uninitialized data) o WIP, usable for "console" apps (C++) o Only x86_64 Linux; Clang 3.3 Summary (all 3 tools)
  • 50. ASan/MSan vs Valgrind (Memcheck) Valgrind ASan MSan Heap out-of-bounds YES YES NO Stack out-of-bounds NO YES NO Global out-of-bounds NO YES NO Use-after-free YES YES NO Use-after-return NO Sometimes NO Uninitialized reads YES NO YES CPU Overhead 10x-300x 1.5x-3x 3x
  • 51. • Slowdowns will add up o Bad for interactive or network apps • Memory overheads will multiply o ASan redzone vs TSan/MSan large shadow • Not trivial to implement Why not a single tool?