People often ask me "How did you learn how to hack?" The answer: by reading. This page is a collection of the blog posts and other articles that I have accumulated over the years of my journey. Enjoy!
vtrnd is an implementation of RNG, a paravirtualized device that is exposed as a hardware RNG device to the guest. he randomness values are transferred into the guest memory by reading queues defined by the guest by using vq_getchain to fill a struct iovec structure with the memory ranges specified by the guest.vtrnd, it is very important to check the return value and check it properly. There are multiple occurrences of NO checks of this return values and signness conversion issues. iovec needs to be initialized and check the amount of file descriptors there are. However, since the return value is never checked, this can be used without ever being initialized. If the right data can be put into these locations, major memory corruption could be caused. size_t. This return value is used for a size in a memcpy as -1. uint16_t. When an assert clause is ran, the check is to make sure the value is greater than or equal to 1. Since this is an unsigned integer -1 becomes a very large positive number, bypassing the security check. Does this assert clause actually do anything, since it is in a production build? That may be another CVE!