diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6bfb3b72704..3e8ff6aba4c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,7 @@ name: CI env: RUSTFLAGS: -Dwarnings RUST_BACKTRACE: 1 + RUSTUP_TOOLCHAIN: 1.48.0 nightly: nightly-2021-04-25 minrust: 1.45.2 diff --git a/README.md b/README.md index ddad6d3127e..d35e2e6994c 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Make sure you activated the full features of the tokio crate on Cargo.toml: ```toml [dependencies] -tokio = { version = "1.8.0", features = ["full"] } +tokio = { version = "1.8.5", features = ["full"] } ``` Then, on your main.rs: diff --git a/tokio/CHANGELOG.md b/tokio/CHANGELOG.md index 806d440766b..149c7918258 100644 --- a/tokio/CHANGELOG.md +++ b/tokio/CHANGELOG.md @@ -1,3 +1,32 @@ +# 1.8.5 (January 27, 2022) + +This release backports a bug fix from 1.16.0 + +Fixes a soundness bug in `io::Take` ([#4428]). The unsoundness is exposed when +leaking memory in the given `AsyncRead` implementation and then overwriting the +supplied buffer: + +```rust +impl AsyncRead for Buggy { + fn poll_read( + self: Pin<&mut Self>, + cx: &mut Context<'_>, + buf: &mut ReadBuf<'_> + ) -> Poll> { + let new_buf = vec![0; 5].leak(); + *buf = ReadBuf::new(new_buf); + buf.put_slice(b"hello"); + Poll::Ready(Ok(())) + } +} +``` + +### Fixed + +- io: **soundness** don't expose uninitialized memory when using `io::Take` in edge case ([#4428]) + +[#4428]: https://github.com/tokio-rs/tokio/pull/4428 + # 1.8.4 (November 15, 2021) This release backports a bug fix from 1.13.1. diff --git a/tokio/Cargo.toml b/tokio/Cargo.toml index 26f1a9ddfb2..c6ccbac225b 100644 --- a/tokio/Cargo.toml +++ b/tokio/Cargo.toml @@ -7,12 +7,12 @@ name = "tokio" # - README.md # - Update CHANGELOG.md. # - Create "v1.0.x" git tag. -version = "1.8.4" +version = "1.8.5" edition = "2018" authors = ["Tokio Contributors "] license = "MIT" readme = "README.md" -documentation = "https://docs.rs/tokio/1.8.4/tokio/" +documentation = "https://docs.rs/tokio/1.8.5/tokio/" repository = "https://github.com/tokio-rs/tokio" homepage = "https://tokio.rs" description = """ diff --git a/tokio/LICENSE b/tokio/LICENSE index ffa38bb61cc..8af5baf01ea 100644 --- a/tokio/LICENSE +++ b/tokio/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2021 Tokio Contributors +Copyright (c) 2022 Tokio Contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated