64 karma · joined Dec 14, 2013 (12y ago) · 27 submissions
comment 12y ago · link · parent
comment 12y ago · link · parent
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.
comment 12y ago · link · parent
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.)
comment 12y ago · link · parent
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.
comment 12y ago · link · parent
comment 12y ago · link · parent
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.
comment 12y ago · link · parent
('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?)
comment 12y ago · link · parent
The TCP part comes from C code in the kernel, so this headline is a little misleading ;-).
comment 12y ago · link · parent
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.
comment 12y ago · link · parent
No idea how much the video costs either, but my employer is a Fortune 500 company.