If I understand it correctly then:
- C function malloc provides a memory block with indeterminate values (which depend on the previous user of this memory block)
- Shared VPS hostings share resources such as RAM and CPU
In that case, my question is: Would be possible to exploit this fact to create a C program which would repeatedly malloc and free memory and log found memory values in order to sniff out other users' important data such as passwords etc.?
If it is not possible, why not?
If it is possible, how can we prevent it from happening?
EDIT: After a long read of VMware manuals I found this one: MANUAL
Page 5, section 2.3, list item 3, lines 6 & 7:
"In order to avoid information leaking among virtual machines, the hypervisor always writes zeroes to the host physical memory before assigning it to a virtual machine. "
So that kind of answers my question for at least one of the hypervisors. There's no way for me to verify whether it's true for all hypervisors.