Patch to server list initialization for FreeRADIUS client lib 1.1.6
DESCRIPTION: FreeRADIUS client library 1.1.6 In lib/config.c, in set_option_srv(), when the serverlist is allocated, the allocated memory currently isn't zeroed. This shouldn't be a problem, as we only search up to serv->max, but in rc_find_server(), we check to see if {acct,auth}servers->secret[i] is NULL. If we don't zero out the SERVER structure upon allocation, this value could be non-zero, and the test for NULL could fail, leading to segfault. The attached patch to lib/config.c addresses this issue by zeroing out the SERVER structure upon allocation. Scott Neugroschl
Scott Neugroschl wrote:
In lib/config.c, in set_option_srv(), when the serverlist is allocated, the allocated memory currently isn't zeroed. This shouldn't be a problem, as we only search up to serv->max, but in rc_find_server(), we check to see if {acct,auth}servers->secret[i] is NULL. If we don't zero out the SERVER structure upon allocation, this value could be non-zero, and the test for NULL could fail, leading to segfault.
The attached patch to lib/config.c addresses this issue by zeroing out the SERVER structure upon allocation.
Added, thanks. Alan DeKok.
participants (2)
-
Alan DeKok -
Scott Neugroschl