summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/getenv.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2016-06-08 04:37:03 +0000
committerkib <kib@FreeBSD.org>2016-06-08 04:37:03 +0000
commitef4ada7b7665029bd2c1c35e80c1a18df361b214 (patch)
tree27ad8ea462c1ee7fc8201def9481098b1209c168 /lib/libc/stdlib/getenv.c
parent910fd3b83d2bb18596d138c4c821005cd9342c7f (diff)
downloadFreeBSD-src-ef4ada7b7665029bd2c1c35e80c1a18df361b214.zip
FreeBSD-src-ef4ada7b7665029bd2c1c35e80c1a18df361b214.tar.gz
Old process credentials for setuid execve must not be dereferenced
when the process credentials were not changed. This can happen if an error occured trying to activate the setuid binary. And on error, if new credentials were not yet assigned, they must be freed to not create the leak. Use oldcred == NULL as the predicate to detect credential reassignment. Reported and tested by: pho Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'lib/libc/stdlib/getenv.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud