You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently submitted a bug report to the multiqueue2 crate which is maintained from a fork of this crate.
The bug was fixed a few days ago in version 0.1.7 of the mulltiqueue2 crate.
The exact same bug exists for the multiqueue crate as well.
FYI, I'll leave a link to the bug report that I submitted for the multiqueue2 crate: abbychau#10
Thank you for checking out this issue 👍
The text was updated successfully, but these errors were encountered:
FYI, here is a working proof of concept that segfaults at runtime.
Below program uses multiqueue = "0.3.2"
#![forbid(unsafe_code)]use std::cell::Cell;use std::sync::Arc;use std::thread;// futures = "0.1.27"use futures::{Future,Sink,Stream};#[derive(Debug,Clone,Copy)]enumRefOrInt<'a>{Ref(&'au64),Int(u64),}staticX:u64 = 0;use multiqueue::mpmc_fut_queue;fnmain(){let(tx, rx) = mpmc_fut_queue(16);let cell = Arc::new(Cell::new(RefOrInt::Int(0xdeadbeef)));let sent = tx.send(Arc::clone(&cell));
thread::spawn(move || {letmut rx = rx.wait();// parent thread sent us an object that is not `Send`!let smuggled_cell = rx.next().unwrap().unwrap();loop{
smuggled_cell.set(RefOrInt::Int(0xdeadbeef));
smuggled_cell.set(RefOrInt::Ref(&X))}});
sent.wait().unwrap();loop{ifletRefOrInt::Ref(addr) = cell.get(){if addr as*const_asusize != 0xdeadbeef{continue;}// Due to the data race, obtaining Ref(0xdeadbeef) is possibleprintln!("Pointer is now: {:p}", addr);println!("Dereferencing addr will now segfault: {}",*addr);}}}
Once a fix is released to crates.io, please open a pull request to update the advisory with the patched version, or file an issue on the advisory database repository.
Hello 🦀 ,
I recently submitted a bug report to the
multiqueue2
crate which is maintained from a fork of this crate.The bug was fixed a few days ago in version 0.1.7 of the
mulltiqueue2
crate.The exact same bug exists for the
multiqueue
crate as well.FYI, I'll leave a link to the bug report that I submitted for the
multiqueue2
crate: abbychau#10Thank you for checking out this issue 👍
The text was updated successfully, but these errors were encountered: