Several memory safety issues have been uncovered in an audit of rusqlite.
See https://github.com/rusqlite/rusqlite/releases/tag/0.23.0 for a complete list.
dlphn 0.5.1
This project might be open to known security vulnerabilities, which can be prevented by tightening the version range of affected dependencies. Find detailed information at the bottom.
dlphn
(15 total, 6 outdated, 4 possibly insecure)
Crate | Required | Latest | Status |
---|---|---|---|
actix-rt | ^1.0.0 | 2.9.0 | out of date |
actix-web | ^2.0.0 | 4.5.1 | out of date |
chrono ⚠️ | ^0.4.10 | 0.4.38 | maybe insecure |
failure | ^0.1.1 | 0.1.8 | up to date |
futures | ^0.3.1 | 0.3.30 | up to date |
local-ip | ^0.1 | 0.1.0 | up to date |
mime_guess | ^2 | 2.0.4 | up to date |
r2d2 | ^0.8.2 | 0.8.10 | up to date |
r2d2_sqlite | ^0.13.0 | 0.24.0 | out of date |
rusqlite ⚠️ | ^0.21.0 | 0.31.0 | out of date |
rust-embed ⚠️ | ^5.2.0 | 8.3.0 | out of date |
serde | ^1.0 | 1.0.198 | up to date |
serde_derive | ^1.0 | 1.0.198 | up to date |
serde_json | ^1.0.44 | 1.0.116 | up to date |
tokio ⚠️ | ^0.2.9 | 1.37.0 | out of date |
rusqlite
: Various memory safety issuesSeveral memory safety issues have been uncovered in an audit of rusqlite.
See https://github.com/rusqlite/rusqlite/releases/tag/0.23.0 for a complete list.
chrono
: Potential segfault in `localtime_r` invocationsUnix-like operating systems may segfault due to dereferencing a dangling pointer in specific circumstances. This requires an environment variable to be set in a different thread than the affected functions. This may occur without the user's knowledge, notably in a third-party library.
No workarounds are known.
tokio
: Data race when sending and receiving after closing a `oneshot` channelIf a tokio::sync::oneshot
channel is closed (via the
oneshot::Receiver::close
method), a data race may occur if the
oneshot::Sender::send
method is called while the corresponding
oneshot::Receiver
is await
ed or calling try_recv
.
When these methods are called concurrently on a closed channel, the two halves of the channel can concurrently access a shared memory location, resulting in a data race. This has been observed to cause memory corruption.
Note that the race only occurs when both halves of the channel are used
after the Receiver
half has called close
. Code where close
is not used, or where the
Receiver
is not await
ed and try_recv
is not called after calling close
,
is not affected.
See tokio#4225 for more details.
rust-embed
: RustEmbed generated `get` method allows for directory traversal when reading files from diskWhen running in debug mode and the debug-embed
(off by default) feature is
not enabled, the generated get
method does not check that the input path is
a child of the folder given.
This allows attackers to read arbitrary files in the file system if they have
control over the filename given. The following code will print the contents of
your /etc/passwd
if adjusted with a correct number of ../
s depending on
where it is run from.
#[derive(rust_embed::RustEmbed)]
#[folder = "src/"]
pub struct Asset;
fn main() {
let d = Asset::get("../../../etc/passwd").unwrap().data;
println!("{}", String::from_utf8_lossy(&d));
}
The flaw was corrected by canonicalizing the input filename and ensuring that it starts with the canonicalized folder path.