Hide Forgot
PATCH: http://patches.gluster.com/patch/5581 in master (libglusterfs: fix buffer overflow in gf_string2int())
gf_string2int()is the same as gf_string2long(), just beforehand it casts the target pointer to long. On a 64 bit machine this means that an 8 bytes region will be written by a call to it. In the standard use-case we use an int pointer as target, which means we are allowed to write 4 bytes only. An example of it: in glusterd-store.c, we can see gf_string2int (value, &brickinfo->port); this overflows to the subsequent field in brickinfo, ie. brickinfo->logfile.