SlideShare a Scribd company logo
Is rust language really safe?
twitter.com/jrabell0
Definition of safety
“Safety is the state of being "safe" (from French sauf), the condition of being
protected from harm or other non-desirable outcomes”[3]
Why safety matters?
● “In January 2009, Google's search engine erroneously notified users that
every web site worldwide was potentially malicious, including its own.”[1]
● “A bug in the code controlling the Therac-25 radiation therapy machine was
directly responsible for at least five patient deaths in the 1980s when it
administered excessive quantities of beta radiation.”[1]
● “The European Space Agency's Ariane 5 Flight 501 was destroyed 40
seconds after takeoff (June 4, 1996). The US$1 billion prototype rocket self-
destructed due to a bug in the on-board guidance software.”[1]
● “Knight’s $440 Million Error – One of the biggest American market makers for
stocks struggled to stay afloat after a software bug triggered a $440 million
loss in just 30 minutes.”[1]
Rust Language
“Rust is a systems programming language that runs blazingly fast, prevents
segfaults, and guarantees thread safety.”[4]
● zero-cost abstractions
● move semantics
● guaranteed memory safety
● threads without data races
● pattern matching
● type inference
● minimal runtime
Projects using Rust
C++ sample
Something wrong?
C++ sample
capacity
elem
ptr
size
0
[…]
STACK HEAP
Rust Default Immutability
Rust Ownership
“Prevents use after free in compile time...”[6]
Rust Borrowing
zionvm fetch sample
Rust Borrowing
“Borrowing prevents moving...”[6]
Stack Based Buffer Overflow 1
Stack Based Buffer Overflow 1
Stack Based Buffer Overflow 2
Heap Based Buffer Overflow
Unsafe keyword
“There are some times when your code might be okay, but Rust thinks it’s not! In
these cases, you can use unsafe code to tell the compiler, “trust me, I know what
I’m doing.” The downside is that you’re on your own; if you get unsafe code wrong,
problems due to memory unsafety like null pointer dereferencing can occur.”[5]
Unsafe Memory Corruption
Vector set_len idea[7]
Unsafe Memory Corruption
Capacity WTF??
Conclusion
● Rustc realiza varias inferencias em tempo de compilacao, porem nos
exemplos que foram demonstrados aqui, algumas checagens em tempo de
execucao poderiam ter sido feitos em tempo de compilacao
● Rust e novos desafios para pesquisadores de seguranca da informacao
● Exploracao de vulnerabilidades em rust totalmente plausivel
References
1. https://en.wikipedia.org/wiki/List_of_software_bugs
2. https://www.exploit-db.com/exploit-database-statistics/
3. https://en.wikipedia.org/wiki/Safety
4. https://www.rust-lang.org/en-US/
5. https://doc.rust-lang.org/book/second-edition/ch19-01-unsafe-rust.html
6. https://www.youtube.com/watch?v=agzf6ftEsLU
7. https://avadacatavra.github.io/rust/gdb/exploit/2017/09/26/attackingrustforfuna
ndprofit.html

More Related Content

PDF
Stealth post-exploitation with phpsploit
PDF
Talk NullByteCon 2015
PDF
Raptor web application firewall
PDF
The Postmodern Binary Analysis
PDF
Understand study
PDF
Metasploit for Penetration Testing: Beginner Class
PDF
44CON London 2015 - 15-Minute Linux Incident Response Live Analysis
Stealth post-exploitation with phpsploit
Talk NullByteCon 2015
Raptor web application firewall
The Postmodern Binary Analysis
Understand study
Metasploit for Penetration Testing: Beginner Class
44CON London 2015 - 15-Minute Linux Incident Response Live Analysis

What's hot (20)

PDF
Defcon Moscow #0x0A - Mikhail Firstov "Hacking routers as Web Hacker"
PDF
NSC #2 - Challenge Solution
PDF
Windows's Kindnesses - Commoner to D-K(d)OM (Direct Kernel Object Manipulation)
PDF
44CON 2014 - Breaking AV Software
PPTX
Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)
PDF
Nullcon Hack IM 2011 walk through
PDF
CPU vulnerabilities - where are we now?
ODP
Malware analysis
PDF
Масштабируемый и эффективный фаззинг Google Chrome
PPTX
Linx privx privileges-sudo misconfiguration group and docker daemon privileges
PPTX
ShinoBOT Suite
PPTX
Your Linux Passwords Are in Danger: MimiDove Meets the Challenge (lightning t...
PDF
Sheila Ayelen Berta - The Art of Persistence: "Mr. Windows… I don’t wanna go ...
PDF
Metasploit - The Exploit Learning Tree
PDF
Rootkit 102 - Kernel-Based Rootkit
PDF
Buffer Overflow Attacks
PDF
Алексей Старов - Как проводить киберраследования?
PPTX
Hacking with Remote Admin Tools (RAT)
PDF
Ricardo J. Rodríguez & Daniel Uroz - When ROP meets Turing: Automatic Generat...
PDF
A Hypervisor IPS based on Hardware Assisted Virtualization Technology
Defcon Moscow #0x0A - Mikhail Firstov "Hacking routers as Web Hacker"
NSC #2 - Challenge Solution
Windows's Kindnesses - Commoner to D-K(d)OM (Direct Kernel Object Manipulation)
44CON 2014 - Breaking AV Software
Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)
Nullcon Hack IM 2011 walk through
CPU vulnerabilities - where are we now?
Malware analysis
Масштабируемый и эффективный фаззинг Google Chrome
Linx privx privileges-sudo misconfiguration group and docker daemon privileges
ShinoBOT Suite
Your Linux Passwords Are in Danger: MimiDove Meets the Challenge (lightning t...
Sheila Ayelen Berta - The Art of Persistence: "Mr. Windows… I don’t wanna go ...
Metasploit - The Exploit Learning Tree
Rootkit 102 - Kernel-Based Rootkit
Buffer Overflow Attacks
Алексей Старов - Как проводить киберраследования?
Hacking with Remote Admin Tools (RAT)
Ricardo J. Rodríguez & Daniel Uroz - When ROP meets Turing: Automatic Generat...
A Hypervisor IPS based on Hardware Assisted Virtualization Technology
Ad

Similar to Is rust language really safe? (20)

PPTX
Why Rust? by Edd Barrett (codeHarbour December 2019)
PDF
Why_safe_programming_matters_and_why_Rust_.pdf
ODP
Rust Primer
PDF
Rust: Systems Programming for Everyone
PDF
Rust: Unlocking Systems Programming
PDF
Introduction to Rust - Waterford Tech Meetup 2025
PDF
Rust and the coming age of high integrity languages
PPT
Rust Programming Language
PDF
Rust Intro @ Roma Rust meetup
PDF
Rust: Reach Further
PDF
An introduction to Rust: the modern programming language to develop safe and ...
PDF
Why rust?
PDF
The Rust Programming Language
PPTX
Why Hiring Rust Developers Can Reduce Technical Debt & Save Millions.pptx
PDF
Intro to Rust 2019
PDF
Rust "Hot or Not" at Sioux
PPTX
Why Is Rust Gaining Traction In Recent Years?
PDF
PDF
Rust Workshop - NITC FOSSMEET 2017
PDF
rrxv6 Build a Riscv xv6 Kernel in Rust.pdf
Why Rust? by Edd Barrett (codeHarbour December 2019)
Why_safe_programming_matters_and_why_Rust_.pdf
Rust Primer
Rust: Systems Programming for Everyone
Rust: Unlocking Systems Programming
Introduction to Rust - Waterford Tech Meetup 2025
Rust and the coming age of high integrity languages
Rust Programming Language
Rust Intro @ Roma Rust meetup
Rust: Reach Further
An introduction to Rust: the modern programming language to develop safe and ...
Why rust?
The Rust Programming Language
Why Hiring Rust Developers Can Reduce Technical Debt & Save Millions.pptx
Intro to Rust 2019
Rust "Hot or Not" at Sioux
Why Is Rust Gaining Traction In Recent Years?
Rust Workshop - NITC FOSSMEET 2017
rrxv6 Build a Riscv xv6 Kernel in Rust.pdf
Ad

More from Nullbyte Security Conference (13)

PDF
Speeding up Red Team engagements with carnivorall
PDF
Gitminer 2.0 - Advance Search on Github
PDF
Automatizando o abuso de repositórios expostos
PDF
Windows Internals: fuzzing, hijacking and weaponizing kernel objects
PDF
Anti-Anti-Forense de Memória: Abortando o "Abort Factor"
PDF
C&C Botnet Factory
PDF
Hacking cable modems the later years
PDF
Muito além do alert() em ataques web client side
PDF
Cabra Arretado Aperriando o WordPress
PDF
Rootkits em kernel space - Redshift, um rootkit para o kernel do FreeBSD
PDF
How i cracked millions of “pt br” hashed passwords
PDF
Evitando execução de códigos arbitrários com GRsecurity e PaX
PDF
All your binaries are belong to us
Speeding up Red Team engagements with carnivorall
Gitminer 2.0 - Advance Search on Github
Automatizando o abuso de repositórios expostos
Windows Internals: fuzzing, hijacking and weaponizing kernel objects
Anti-Anti-Forense de Memória: Abortando o "Abort Factor"
C&C Botnet Factory
Hacking cable modems the later years
Muito além do alert() em ataques web client side
Cabra Arretado Aperriando o WordPress
Rootkits em kernel space - Redshift, um rootkit para o kernel do FreeBSD
How i cracked millions of “pt br” hashed passwords
Evitando execução de códigos arbitrários com GRsecurity e PaX
All your binaries are belong to us

Recently uploaded (20)

PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Machine learning based COVID-19 study performance prediction
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Encapsulation theory and applications.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
Encapsulation_ Review paper, used for researhc scholars
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Per capita expenditure prediction using model stacking based on satellite ima...
Machine learning based COVID-19 study performance prediction
20250228 LYD VKU AI Blended-Learning.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Chapter 3 Spatial Domain Image Processing.pdf
Approach and Philosophy of On baking technology
Network Security Unit 5.pdf for BCA BBA.
Mobile App Security Testing_ A Comprehensive Guide.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
The Rise and Fall of 3GPP – Time for a Sabbatical?
Dropbox Q2 2025 Financial Results & Investor Presentation
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Encapsulation theory and applications.pdf
Unlocking AI with Model Context Protocol (MCP)

Is rust language really safe?