News for hackers. Stuff that matters.
Re:High-Throughput Game Message Server with Python WebSockets by lwansbrough on Saturday December 05, 2020 @08:07PM (#25319977)
Ah yes, C, well known for its memory safety!
Re:High-Throughput Game Message Server with Python WebSockets by 1024core on Saturday December 05, 2020 @08:58PM (#25320306)
As with any tool, if you don't use it properly it can hurt you.
Re:High-Throughput Game Message Server with Python WebSockets by rowanG077 on Saturday December 05, 2020 @09:23PM (#25320460)
That's quite a ridiculous statement in this context. Even highly-trained, extremely smart developers are proven to not be able to use C without introducing gaping security holes. That's not "it can hurt you". That's "it hurts you and everyone that is exposed to your RCE machine".
Re:High-Throughput Game Message Server with Python WebSockets by 1024core on Sunday December 06, 2020 @02:34PM (#25325994)
Have you looked at code by AntiRez, the author of Redis? Redis is written in plain C.

What about QMail and DJBDNS, from Dan Bernstein? Again, all C.

And the mother of all: the Linux kernel. Again, in C.

Re:High-Throughput Game Message Server with Python WebSockets by rowanG077 on Sunday December 06, 2020 @07:45PM (#25328190)
Redis has RCE exploits which would not exist in a memory safe language [1]. QMail had an RCE as well[2] and DJBDNS has had a security bug which would not have occurred in a memory safe languages [3]. The linux kernel has had an incredible amount of memory bugs over the years. The software you mentioned does much, much better then the average C written code. But it still has had issues with memory. So in fact all your examples prove my point.

[1] https://github.com/jas502n/Redis-RCE

[2] https://www.qualys.com/2020/05/19/cve-2005-1513/remote-code-...

[3] https://web.archive.org/web/20190126114638/http://article.gm...

Re:High-Throughput Game Message Server with Python WebSockets by gitweb on Saturday December 05, 2020 @11:46PM (#25321113)
C is not C++. There is a reason core services for DHCP, DNS, etc are built in C and not Rust. If you're a careless developer you can have security vulnerabilities in any language.
Re:High-Throughput Game Message Server with Python WebSockets by weakfish on Sunday December 06, 2020 @12:39AM (#25321385)
The reason they're built in C is legacy and the fact that Rust hasn't been around all that long.
Re:High-Throughput Game Message Server with Python WebSockets by 1024core on Sunday December 06, 2020 @02:38PM (#25326017)
Well, what's stopping you from rewriting it in Rust?
Re:High-Throughput Game Message Server with Python WebSockets by imtringued on Sunday December 06, 2020 @08:00AM (#25323228)
That's only true on Linux and other systems where the kernel has been written in C. On some platforms the kernel provides no backwards compatibility guarantees and that means backwards compatibility is handled by libc. This means C is enshrined into the platform and often the path of least resistance.

There was also a pure Rust Wayland binding that failed because Wayland assumes that you are using C semantics which made it hard to provide a safe interface for Rust that was also convenient.

Re:High-Throughput Game Message Server with Python WebSockets by rowanG077 on Sunday December 06, 2020 @07:01AM (#25322965)
Yes, and that good reason was that Rust did not exist.
Re:High-Throughput Game Message Server with Python WebSockets by malka on Saturday December 05, 2020 @09:32PM (#25320513)
I'd rather be hurt by my safety razor than by my chainsaw though.