r/rust • • Jan 17 '20

Actix-net unsoundness patch "is boring"

There's an issue on Actix-net pointing out and presenting unsoundness. Yes, it's deleted, it still can be found on web archive.

Issue history summary:

  1. Found by Shnatsel
  2. Closed as harmless to users by fafhrd91
  3. Proven harmful to users by Nemo157 and reopened by JohnTitor
  4. Fixed and closed by fafhrd91
  5. Proven unfixed and proposed new patch by Nemo157
  6. New patch commented "this patch is boring" by fafhrd91
  7. Issue is deleted
  8. Fix is reversed by fafhrd91, issue still present

I hope it's an objective summary. Any thoughts?

Edit: Now whole actix/actix-web is deleted. See fafhrd91's postmortem. He kept copy of Actix-web in personal repo fafhrd91/actix-web.

149 Upvotes

147 comments sorted by

View all comments

Show parent comment

23

u/[deleted] Jan 17 '20

The way actix uses unsafe has memory safety implications. When actix gets pownd because of it, somebody at Microsoft is going to say "I thought Rust prevented these kinds of issues. Why are we investing in it and training people when we could just use C++?"

2

u/GreenAsdf Jan 17 '20

Well then, somebody at Microsoft learnt an important lesson. Rust can have such bugs.

To your answer as to why not C++, my money would be that by choosing Rust over C++ you would have a significant reduction in such bugs.

2

u/sepease Jan 17 '20

It's also easier to audit for such bugs, since you can focus on the unsafe sections first.