Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 6 Nov 2017 15:09:20 -0800
From: Seth Arnold <>
Subject: Re: Fw: Security risk of vim swap files

On Sun, Nov 05, 2017 at 07:03:07PM -0700, Kurt Seifried wrote:
> Also you're all still ignoring umask =(. Please, when you create a new
> file, check the umask and subtract it to make sure you're abiding by the
> user's wishes.

Is it not the kernel's responsibility to enforce umask(2) is properly

My umask(3p) includes:

       The file mode creation mask of the process is used to turn
       off permission bits in the mode argument supplied during
       calls to the following functions:

        *  open(), openat(), creat(), mkdir(), mkdirat(), mkfifo(),
           and mkfifoat()

        *  mknod(), mknodat()

        *  mq_open()

        *  sem_open()

Obviously there's good case to be made that manual chmod(2) calls could
or should be modified by umask(2) values by hand, but probably all those
chmod(2) calls ought to be re-written to set the modes correctly at file
creation time (or mkdir, etc) to avoid race conditions.


Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)

Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.