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
The Send and Sync implementation of tokio_udev::MonitorSocket is incorrect and can be used to trigger undefined behavior:
Create a MonitorSocket and poll it until an Event is returned.
Send the monitor to another thread and poll it until an Event is returned.
On both threads, start and endless loop where you clone the returned event drop the clone again.
This results in unsynchronized calls to udev_ref and udev_unref on the same udev instance. This is not allowed by libudev and triggers undefined behavior.
In particular, no type that contains pointers to libudev objects can possibly be Send or Sync.
The text was updated successfully, but these errors were encountered:
I've removed the Send/Sync implementations for the MonitorSocket type, if the udev crate doesn't neither this should. Thanks for pointing it out! As a result, 0.7.0 has been released.
The Send and Sync implementation of
tokio_udev::MonitorSocket
is incorrect and can be used to trigger undefined behavior:This results in unsynchronized calls to
udev_ref
andudev_unref
on the sameudev
instance. This is not allowed by libudev and triggers undefined behavior.In particular, no type that contains pointers to libudev objects can possibly be
Send
orSync
.The text was updated successfully, but these errors were encountered: