Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Wed, 13 May 2009 17:05:38 +0800
From: Eugene Teo <>
CC: "Steven M. Christey" <>
Subject: CVE request: kernel: problem with NFS v4 client handling of MAY_EXEC
 in nfs_permission

Frank Filz reported: the problem is that permission checking is skipped
if atomic open is possible, but when exec opens a file, it just opens it
O_READONLY which means EXEC permission will not be checked at that time.

This problem is observed by the following sequence (executed as root):

mount -t nfs4 server:/ /mnt4
echo "ls" >/mnt4/foo
chmod 744 /mnt4/foo
su guest -c "mnt4/foo"

1928 int nfs_permission(struct inode *inode, int mask)
1929 {
1941         switch (inode->i_mode & S_IFMT) {
1942                 case S_IFLNK:
1943                         goto out;
1944                 case S_IFREG:
1945                         /* NFSv4 has atomic_open... */
1946                         if (nfs_server_capable(inode, \
1947                                         && (mask & MAY_OPEN))

We need to make sure that if mask & MAY_EXEC, we force a permission
check, otherwise the script can be executed even if guest has no +x

1948                                 goto out;
1949                         break;

Thanks, Eugene

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.