64 karma · joined December 14, 2013
The problem isn't that he's being punished by the courts, it's that he's seeing indefinite jail time just for opening his mouth. There is a crime here, but the punishment doesn't fit it.
Is NY trying to race to the bottom?
On the plus side, you get security updates, and any gems that are packaged should be compatible with each other to some extent. In general, I think ruby packages are good for end-users, but maybe not great for developing ruby applications or other gems.
(I don't mean to rag on Fedora packaging here — I'm a Fedora packager! I just want people to be aware of the limitations of distro packaging.)
Ah, it's possible repne scasb halts when ecx drops to zero (that would explain some of the string length asm code I found when I googled it). I'm not very familiar with x86 mneumonics apart from the basics ('mov').
Why is this more than 4 million bytes per second (4 MB/s)? A packet can contain a single byte.
Edit: Oh! Just got to footnote 2. Thanks, author!
So, not only will a trickle DoS other clients, each byte will also force an O(n) traversal of $buf (burning CPU). Granted, buf is only 1000 bytes, but that's not great.
It looks like a request with no space could force you to walk (`repne scasb`) through invalid memory after $buf. Also maybe corrupt it (unescape_request_path).
It will also fail to correctly parse HTTP/0.9 (not a big deal, but part of spec). The parsing code ignores the existence of verbs other than GET. (Doesn't check that the verb is GET either.)
We don't validate that paths start with /, we just skip that byte. Okay:
mov (path), %al
...
cmp $'/, %al
je badreq
Since valid GETs are of the form: GET /foo.txt HTTP/1.0
^-- path=buf+5
As you point out, a client close will cause SIGPIPE causing a crash (DoS).That's all I see. But I'm not an asm expert and I'm sure I've missed something.
#define __DECONST(type, var) ((type)(uintptr_t)(const void*)(var))This server is single threaded and artificially serializes requests, at a minimum. The copy through userspace is going to hurt compared to sendfile for larger files.
('cstub' is a wonderful program that is downloaded over HTTP and runs as root. It's supposed to monitor security, or something. I did mention I run this on a VM, right?)
The TCP part comes from C code in the kernel, so this headline is a little misleading ;-).
Reusable piped programs are great for some things, especially a productive shell language. No, composing processes is not great for all things, and certainly not where performance is required. This is why FreeBSD is a monolithic kernel instead of a microkernel with processes, for example.
Spawning a program is incredibly slow, even ignoring disk read times, compared to 3 levels of low-branch-factor search in any language.
No idea how much the video costs either, but my employer is a Fortune 500 company.