Unix-like operating systems may segfault due to dereferencing a dangling pointer in specific circumstances. This requires the user to set any environment variable in a different thread than the affected functions.
The affected functions are:
Non-Unix targets are unaffected. This includes Windows and wasm.
Pending a proper fix, the internal method that determines the local offset has been modified to always return None on the affected operating systems. This has the effect of returning an Err on the try_* methods and UTC on the non-try_* methods.
Users and library authors with time in their dependency tree should perform cargo update, which will pull in a the updated, unaffected code.
No workarounds are known.
smallvec: Buffer overflow in SmallVec::insert_many
A bug in the SmallVec::insert_many method caused it to allocate a buffer that was smaller than needed. It then wrote past the end of the buffer, causing a buffer overflow and memory corruption on the heap.
This bug was only triggered if the iterator passed to insert_many yielded more items than the lower bound returned from its size_hint method.
The flaw was corrected in smallvec 0.6.14 and 1.6.1, by ensuring that additional space is always reserved for each item inserted. The fix also simplified the implementation of insert_many to use less unsafe code, so it is easier to verify its correctness.
Thank you to Yechan Bae (@Qwaz) and the Rust group at Georgia Tech’s SSLab for finding and reporting this bug.
diesel: Fix a use-after-free bug in diesels Sqlite backend
We've misused sqlite3_column_name. The
states that the following:
The returned string pointer is valid until either the prepared statement
is destroyed by sqlite3_finalize() or until the statement is automatically
reprepared by the first call to sqlite3_step() for a particular
run or until the next call to sqlite3_column_name()
or sqlite3_column_name16() on the same column.
As part of our query_by_name infrastructure we've first received all
field names for the prepared statement and stored them as string slices
for later use. After that we called sqlite3_step() for the first time,
which invalids the pointer and therefore the stored string slice.