Mike Borozdin has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1247036?usp=email ) Change subject: Fix buffer overflow risk in gss_credcache ...................................................................... Fix buffer overflow risk in gss_credcache In find_keytab_entry, replace strcpy with bounds-checked strlcpy when building myhostad, capping the copy size to sizeof(myhostad) - 1 so there is always room to safely append '$' and the NUL terminator. Additionally, explicitly NUL-terminate myhostname after gsh_gethostname() in case gethostname() truncated the output, and cast to (unsigned char) for toupper() to avoid undefined behavior. Change-Id: I67ca60649de32957cb5f6c5b9d13c32d2b852c0d Signed-off-by: Mike Borozdin <nolongemails@gmail.com> --- M src/RPCAL/gss_credcache.c 1 file changed, 6 insertions(+), 5 deletions(-) git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/36/1247036/1 -- To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1247036?usp=email To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: ffilz/nfs-ganesha Gerrit-Branch: next Gerrit-Change-Id: I67ca60649de32957cb5f6c5b9d13c32d2b852c0d Gerrit-Change-Number: 1247036 Gerrit-PatchSet: 1 Gerrit-Owner: Mike Borozdin <nolongemails@gmail.com>