Problem Description:
open(2) omits permission checks when it has just created the
file being opened. When called with both O_CREAT and O_DIRECTORY
on an existing directory, open(2) did not create anything, but still
omitted the checks. As a result, a user could open a directory for
reading or searching without the corresponding permission.
Impact:
An unprivileged local user can list the contents of directories
they are not permitted to read, and access files within directories
they are not permitted to search, subject to the permissions of
those files and of the directory's ancestors.