HomeFreeBSD

do_execve(): lock vnode when needed.

Description

do_execve(): lock vnode when needed.

Code after exec_fail_dealloc label expects that the image vnode is
locked if present. When copyout() of the strings or auxv vectors fails,
goto to the error handling did not relocked the vnode as required.

The copyout() can be made failing e.g. by creating an ELF image with
PT_GNU_STACK segment disabling the write.

Reported by: Jonathan Stuart <n0t.jcs@gmail.com> (found by fuzzing)
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

Details

Provenance
kibAuthored on
Parents
rS343889: cxgbev(4): Initialize debug_flags from the environment like in the PF driver.
Branches
Unknown
Tags
Unknown