[quake3] QVM vs. shared libs

Ben Noordhuis bnoordhuis at gmail.com
Fri Jun 8 16:04:24 EDT 2007


On 6/8/07, LinuxManMikeC <linuxmanmikec at gmail.com> wrote:
> QVM is bytecode that needs a little interpreting done at runtime.
> [...]  The QVM is more secure because a mod won't be able to do all
> kinds of voodoo to break out of the game's memory space.

Better cross-platform portability? Yes. More secure? Well, no. The
QVMs are JIT-compiled to native code on most architectures. A shell
code snippet like the one below will execute without a hitch on 32 and
64 bits Linux.

/* syscall exit() */
static void die(void) {
    unsigned char shellcode[] = {
        0x31, 0xC0, /* xorl %eax, %eax */
        0x40,       /* incl %eax       */
        0x89, 0xC3, /* movl %eax, %ebx */
        0xCD, 0x80  /* int  $0x80      */
    };
    ((void (*)(void))shellcode)();
}



More information about the quake3 mailing list