[PATCH] Harden tcache double-free check
Florian Weimer
fweimer@redhat.com
Wed Jul 7 17:17:19 GMT 2021
* Siddhesh Poyarekar:
> +/* Process-wide key to try and catch a double-free in the same thread. */
> +static uintptr_t tcache_key;
> +
> +/* The value of tcache_key does not really have to be a cryptographically
> + secure random number. It only needs to be arbitrary enough so that it does
> + not collide with values present in applications, which would be quite rare,
> + about 1 in 2^wordsize. */
The comment should say that a collision could result in performance
problems.
Apart from that, the patch looks okay to me.
Thanks,
Florian
More information about the Libc-alpha
mailing list