gnuserv before 3.12, as shipped with XEmacs, does not properly check the specified length of an X Windows MIT-MAGIC-COOKIE cookie, which allows remote attackers to execute arbitrary commands via a buffer overflow, or brute force authentication by using a short cookie length.
Buffer Copy without Checking Size of Input The product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer.