i should note that i was fundamentally opposed to having the vtable in `mowgli.string`, but Pippijn was insistent that it was somehow convenient to have it.
almost everyone just uses mowgli_string_foo functions with it anyway.
hopefully these people remove the vtable when fixing the hole properly, because you get some really nice gadgets for crafting a ret2libc attack there :)
exploitation of CVE-2016-4478 is simple: generate an XMLRPC request that will generate exactly multiple of 64 bytes output, excluding the nul terminator.
remember, this is a Pascal string used in the xmlrpc code because Trystan was smart and realized he should use Pascal strings when dealing with webshit.
later on some fuckwit "optimized" the code by dumping the raw string instead of converting properly, and probably didn't notice because the scratch buffer saved him.
(pascal strings are typically overallocated to ensure alignment and avoid spurious reallocs)
once you have such a response, you will also get back the contents of the vtable.
ok ok ok if you do not secure your xmlrpc and you're one of the poor souls who shows up on shodan.io when i search for "atheme" i am really sorry but because of these toots somebody probably is going to own your shit and it's going to be hilarious. just ask EFnet.
i gotta give them bonus points for swapping a memcpy with strncpy which was entirely pointless because both will happily crash you if there is no scratch buffer remaining.
AND THEN THEY JUST PUT A NUL IN THE PASCAL STRING
fuck it, y'all are on your own with this one.
ARGH WHAT THE FUCKING FUCK
the incompetence is really triggering me over here
since the "new atheme" idiots are busy playing serious business security embargo games, I figured out the vulnerability for the rest of us.
they completely fucked up their mitigation of CVE-2016-4478, making it entirely pointless because THEY DID NOT UNDERSTAND PASCAL STRINGS ARE NOT THE SAME AS C STRINGS (good job guys, maximum security here)
actually it is, `docs` is a virtual which tells the package manager you want all docs for all packages installed. you will soon also be able to do that with the -dev packages.