diff options
| author | bors <bors@rust-lang.org> | 2018-09-20 17:25:46 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-09-20 17:25:46 +0000 |
| commit | b801ae66425cf7c3c71052b19ef8f145b0d0513d (patch) | |
| tree | 4e3c1ca49a7ef3b4c792bef589bfd6eff5aada78 /src/bootstrap | |
| parent | aa3ca1994904f2e056679fce1f185db8c7ed2703 (diff) | |
| parent | 1b94b84ad0143ea2039610e3aec9e929a8a20733 (diff) | |
| download | rust-1.29.1.tar.gz rust-1.29.1.zip | |
Auto merge of #54397 - alexcrichton:fix-bug-stable, r=steveklabnik 1.29.1
[stable] std: Check for overflow in `str::repeat` This commit fixes a buffer overflow issue in the standard library discovered by Scott McMurray where if a large number was passed to `str::repeat` it may cause and out of bounds write to the buffer of a `Vec`. This bug was accidentally introduced in #48657 when optimizing the `str::repeat` function. The bug affects stable Rust releases 1.26.0 to 1.29.0. We plan on backporting this fix to create a 1.29.1 release, and the 1.30.0 release onwards will include this fix. The fix in this commit is to introduce a deterministic panic in the case of capacity overflow. When repeating a slice where the resulting length is larger than the address space, there’s no way it can succeed anyway! The standard library and surrounding libraries were briefly checked to see if there were othere instances of preallocating a vector with a calculation that may overflow. No instances of this bug (out of bounds write due to a calculation overflow) were found at this time. Note that this commit is the first steps towards fixing this issue, we'll be making a formal post to the Rust security list once these commits have been merged.
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/channel.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootstrap/channel.rs b/src/bootstrap/channel.rs index 04d576df955..e9540d6376a 100644 --- a/src/bootstrap/channel.rs +++ b/src/bootstrap/channel.rs @@ -24,7 +24,7 @@ use Build; use config::Config; // The version number -pub const CFG_RELEASE_NUM: &str = "1.29.0"; +pub const CFG_RELEASE_NUM: &str = "1.29.1"; pub struct GitInfo { inner: Option<Info>, |
