Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Nov 2016 17:01:37 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-threads@FreeBSD.org
Subject:   [Bug 214540] pam_exec isn't multithreading save
Message-ID:  <bug-214540-16@https.bugs.freebsd.org/bugzilla/>

index | next in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214540

            Bug ID: 214540
           Summary: pam_exec isn't multithreading save
           Product: Base System
           Version: 11.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: threads
          Assignee: freebsd-threads@FreeBSD.org
          Reporter: crest@bultmann.eu

The pam_exec module uses vfork()+execve() and waitpid() to spawn a child
process and wait for its completion. This is a race condition in a
multithreaded process using PAM. An other thread could reap the process forked
by pam_exec in which case waitpid() would either fail because there is no valid
pid to wait for or wait for the wrong process if it happens to reuse the pid.
The correct solution would be to use pdfork() and wait with kevent() on the
(EVFILT_PROCDESC, process descriptor) event.

-- 
You are receiving this mail because:
You are the assignee for the bug.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-214540-16>