Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a5aabb5
Add 'Hardening Rust Code Against Runtime Failures' article
mre Jan 12, 2026
1125ee4
fix typos
mre Jan 12, 2026
cd90a16
fix typos etc
mre Jan 12, 2026
dd437a4
fix heading
mre Jan 12, 2026
a020ab5
wording, links
mre Jan 13, 2026
4d72d35
add resources
mre Jan 13, 2026
d78e93b
Add section on limiting runtime attack surface in Rust apps
mre Feb 19, 2026
2f4ca4e
Update content/blog/hardening-rust/index.md
mre Jan 14, 2026
fe30c81
Update content/blog/hardening-rust/index.md
mre Jan 14, 2026
d3f6b24
Add section on mimalloc and update Docker hardening advice
mre Feb 19, 2026
0ca71bb
Clarify Landlock example and add note on Meta's below vulnerability
mre Feb 19, 2026
b7bf0a3
Add section on using Miri to detect undefined behavior
mre Feb 19, 2026
cde605c
Add reference to 2026 Miri research paper
mre Feb 19, 2026
3981f14
Add note about tail-call optimization in Scheme and Haskell
mre Feb 19, 2026
a003bf1
Expand advice on sanitizing sensitive data in panic messages
mre Feb 19, 2026
e4f84c5
Expand cargo-tarpaulin description to mention untested code paths
mre Feb 19, 2026
2b6f018
Add sections on graceful shutdown, circuit breakers, resource limits,
mre Feb 19, 2026
3ca6290
Rewrite graceful shutdown, circuit breaker, and health check sections
mre Feb 19, 2026
57a923d
Update content/blog/hardening-rust/index.md
mre Feb 21, 2026
d973666
Update content/blog/hardening-rust/index.md
mre Feb 21, 2026
40d93bd
integrate feedback
mre Jul 20, 2026
6659bba
Refine hardening Rust article
mre Jul 20, 2026
4ab3afb
work on post
mre Jul 21, 2026
ac316f2
update content
mre Jul 21, 2026
db20f01
cross-link post
mre Jul 21, 2026
4444cab
better word
mre Jul 21, 2026
752ab2c
typos
mre Jul 21, 2026
f0fd016
update links
mre Jul 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion content/blog/bugs-rust-wont-catch/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ resources = [
"[An update on rust-coreutils](https://discourse.ubuntu.com/t/an-update-on-rust-coreutils/80773): Canonical's announcement of the audit results",
"[Patterns for Defensive Programming in Rust](/blog/defensive-programming/): companion post on writing more robust Rust code",
"[Pitfalls of Safe Rust](/blog/pitfalls-of-safe-rust/): common mistakes even safe Rust code can make",
"[Hardening Rust Code For Production](/blog/hardening-rust/): runtime failure modes and production hardening",
"[Sharp Edges In The Rust Standard Library](/blog/sharp-edges-in-rust-std/): surprising behaviors in `std`",
"[Rust Prevents Data Races, Not Race Conditions](/blog/rust-prevents-data-races-not-race-conditions/): where Rust's concurrency safety ends",
"[uutils/coreutils on GitHub](https://github.com/uutils/coreutils): the Rust reimplementation of GNU coreutils",
Expand Down Expand Up @@ -200,7 +201,7 @@ UTF-8 is a great default for application strings, but it's absolutely, positivel

## Treat Every `panic!` as a Denial of Service

In a CLI, every `unwrap`, every `expect`, every slice index, every unchecked arithmetic operation, every [`from_utf8`](https://doc.rust-lang.org/std/str/fn.from_utf8.html) is a potential denial of service if an attacker can shape the input.
In a CLI, every `unwrap`, every `expect`, every slice index, every unchecked arithmetic operation, every [`from_utf8`](https://doc.rust-lang.org/std/str/fn.from_utf8.html) is a potential denial of service if an attacker can control the input.
That's because a `panic!` unwinds the stack and aborts the process. If your tool is running in a cron job, a CI pipeline, or a shell script, that means the whole thing just stops working. Even worse, you could find yourself in a crash loop that paralyzes the entire system.

A canonical case from the audit was `sort --files0-from` ([CVE-2026-35348](https://ubuntu.com/security/CVE-2026-35348)). The flag reads a NUL-separated list of filenames from a file, but the parser called `expect()` on a UTF-8 conversion of each name:
Expand Down
1 change: 1 addition & 0 deletions content/blog/defensive-programming/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ reviews = [
resources = [
"[Making illegal states unrepresentable](/blog/illegal-state/)",
"[Compile-time invariants in Rust](/blog/compile-time-invariants/)",
"[Hardening Rust Code For Production](/blog/hardening-rust/) -- what can still go wrong at runtime and how to prepare for it",
]
+++

Expand Down
Binary file added content/blog/hardening-rust/cargo-audit.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading