FIX privsep.c, yes, vulnerability (wapiflapi)..
commitcc48b652211f9d4bc28d4c46f793772074cef65a
authorSteffen (Daode) Nurpmeso <steffen@sdaoden.eu>
Fri, 27 Jan 2017 18:58:39 +0000 (27 19:58 +0100)
committerSteffen (Daode) Nurpmeso <steffen@sdaoden.eu>
Fri, 27 Jan 2017 19:07:41 +0000 (27 20:07 +0100)
treeee1ba43c5e68c4eb7ddd4c31353a79c55267e156
parent38fa403fb5c786376252ea804b22577482b62bab
FIX privsep.c, yes, vulnerability (wapiflapi)..

wapiflapi (wapiflapi at yahoo dot fr) reported a vulnerability
when the privsep program is driven directly: it is possible to
pass a random string which includes path separators.

This random string is used to build the path name of a an
O_EXCLusively created file, which then is fchown()ed to the owner
of the mailbox the privsep child is to be used to create a lock
file for.  The exclusively created file is then removed, whether
the race has been won or not.

The privsep child will refuse to run unless the executing user
owns the mailbox file, that is, has read (or read/write, dependent
on mode), the target of the link will always be the name of said
mailbox with a ".lock" suffix (Unix dotlock locking).
privsep.c