-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible undefined behavior and other oddly looking code patterns #324
Comments
Thanks. Yes, these unsafe sync are not warranted, we intended to do so, because those places are not needed to be strictly warranted. And for 64-bit system, writing / reading a 64-bit number (aligned) is atomic. Of course, changing to safe sync code will be more warranted and friendly. We will do. |
We also welcome PR. |
That doesn't account for the write making its way through the cache lines all the way back to main memory. While the write itself may be atomic in the processor (if the address is properly aligned), using real synchronization is still required in order to make sure the write makes it all way back to main memory to be observed correctly. Using real synchronization also invalidates the cache lines properly. |
Here's a minimal playgound link where you can also see the UB using |
RustDesk is a remote control software that people unaware of best practices will be installing on their personal machines often exposing it to the public Internet. From many types of software project this one is particularly security sensitive, as bugs can easily translate into people getting harmed financially or even worse ways. Looks like you are trying to commercialize it, so your responsibility of providing a secure software are even greater (possibly even legally liable, IANAL). Unless you have some solid explanation why these Please do some more research on the matter. My advice: get rid of all |
Thanks all, 1142cf1 |
Why is this closed @rustdesk? Your commit 1142f1 only addresses a fraction of the issues listed in/under https://lobste.rs/s/njfvjb/rustdesk_with_tailscale_on_arch_linux E.g. what about the use of awk/cat wrappers? |
Please see:
https://lobste.rs/s/njfvjb/rustdesk_with_tailscale_on_arch_linux#c_5dyag0
I took a quick look and least the
unsafe
use seems unwarranted and plain UB, which might expose users to severe security risks.The text was updated successfully, but these errors were encountered: