Skip to content

Commit 40094bf

Browse files
committed
Update for -fPIC bug
1 parent dfc3eac commit 40094bf

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

_posts/2017-02-09-Rust-1.15.1.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,23 @@ appropriate page on our website, and check out the [detailed release notes for
2222

2323
### What's in 1.15.1 stable
2424

25-
This release fixes a single issue, a soundness bug in the new
26-
`vec::IntoIter::as_mut_slice` method. The problem with this three line function
27-
was [discovered] just minutes after publishing Rust 1.15.0, and is a reminder
28-
that writing unsafe code is hard.
25+
This release fixes two issues, a soundness bug in the new
26+
`vec::IntoIter::as_mut_slice` method, and a regression wherein certain C
27+
components of the Rust distribution were [not compiled with `-fPIC`][fpic]. The
28+
latter results in the text section of executables being writable in some
29+
configurations, including common Linux configurations, subverting an important
30+
attack mitigation, and causing longer startup times by causing the linker to do
31+
more work. For mostly-Rust codebases, the practical impact of losing read-only
32+
text sections is relatively small (since Rust's type system is its first line of
33+
defense), but for Rust linked into other codebases the impact could be
34+
unexpectedly quite significant. The details of the bug are not that interesting
35+
though, and rest of this post focuses on the former soundness bug.
36+
37+
[fpic]: https://github.com/rust-lang/rust/pull/39523
38+
39+
The problem with `as_mut_slice`, a three line function, was [discovered] just
40+
minutes after publishing Rust 1.15.0, and is a reminder that writing unsafe code
41+
is hard.
2942

3043
[discovered]: https://www.reddit.com/r/rust/comments/5roiq7/announcing_rust_115/dd8vujs/
3144

0 commit comments

Comments
 (0)