Bugzilla – Bug 562
rebuild_env() function can truncate uid
Last modified: 2013-12-16 15:08:02 MST
uid_t is 32-bits so the maximal length in decimal is 10 digits. MAX_UID_T_LEN, which represents the maximum length of the decimal string representation of a uid_t, suitably defaults to 10 characters. However, the rebuild_env() function in plugins/sudoers/env.c causes 10-digit uids to be truncated in order to nul-terminate the string. One more character (for the terminating nul) needs to be allocated for idbuf in this function.
Fixed in sudo 1.8.6
*** Bug 629 has been marked as a duplicate of this bug. ***