HomeFreeBSD

Old process credentials for setuid execve must not be dereferenced

Description

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

Details

Provenance
kibAuthored on
Parents
rS301579: Bump date on ifconfig(8) and vlan(4) to reflect the changes made
Branches
Unknown
Tags
Unknown