Andreas Gruenbacher | 27 May 22:13 2016
Picon

[PATCH] posix_acl: Clear SGID bit when setting file permissions

From: Jan Kara <jack <at> suse.cz>

When file permissions are modified via chmod(2) and the user is not in
the owning group or capable of CAP_FSETID, the setgid bit is cleared in
inode_change_ok().  Setting a POSIX ACL via setxattr(2) sets the file
permissions as well as the new ACL, but doesn't clear the setgid bit in
a similar way; this allows to bypass the check in chmod(2).  Fix that.

Signed-off-by: Andreas Gruenbacher <agruenba <at> redhat.com>
---

Git branch:
  https://git.kernel.org/cgit/linux/kernel/git/agruen/linux.git/log/?h=work.acl2

 fs/9p/acl.c               | 40 +++++++++++++++++-----------------------
 fs/btrfs/acl.c            |  6 ++----
 fs/ceph/acl.c             |  6 ++----
 fs/ext2/acl.c             | 12 ++++--------
 fs/ext4/acl.c             | 12 ++++--------
 fs/f2fs/acl.c             |  6 ++----
 fs/gfs2/acl.c             | 12 +++---------
 fs/hfsplus/posix_acl.c    |  4 ++--
 fs/jffs2/acl.c            |  9 ++++-----
 fs/jfs/acl.c              |  6 ++----
 fs/ocfs2/acl.c            | 10 ++++------
 fs/orangefs/acl.c         | 15 +++++----------
 fs/posix_acl.c            | 31 +++++++++++++++++++++++++++++++
 fs/reiserfs/xattr_acl.c   |  8 ++------
 fs/xfs/xfs_acl.c          | 13 ++++---------
 include/linux/posix_acl.h |  1 +
(Continue reading)

Miklos Szeredi | 27 May 21:44 2016
Picon

[GIT PULL] overlayfs update for 4.7

Hi Linus,

Please pull from:

  git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git overlayfs-linus

The meat of this is a change to use the mounter's credentials for operations
that require elevated privileges (such as whiteout creation).  This fixes
behavior under user namespaces as well as being a nice cleanup.

Thanks,
Miklos

---
Antonio Murdaca (1):
      ovl: override creds with the ones from the superblock mounter

Miklos Szeredi (1):
      ovl: update documentation

Vivek Goyal (1):
      ovl: Do d_type check only if work dir creation was successful

---
 Documentation/filesystems/overlayfs.txt |  9 -----
 fs/overlayfs/copy_up.c                  | 26 +------------
 fs/overlayfs/dir.c                      | 67 +++------------------------------
 fs/overlayfs/overlayfs.h                |  1 +
 fs/overlayfs/readdir.c                  | 14 ++-----
 fs/overlayfs/super.c                    | 37 +++++++++++++-----
(Continue reading)

Seung-Woo Kim | 27 May 13:09 2016

[BUG] Panic when systemd boot do mkdir on tmpfs mounted path with smack enabled environment

Hello,

After commit, "b968091 security_d_instantiate(): move to the point prior to attaching dentry to inode",
booting on system with
systemd and security smack, following kernel panic occurs.

---
Unable to handle kernel paging request at virtual address fffffff4
pgd = eda74000
[fffffff4] *pgd=6fffd861, *pte=00000000, *ppte=00000000
Internal error: Oops: 37 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 1 Comm: systemd Not tainted 4.6.0-11010-gdc03c0f-dirty #54
Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
task: ee948000 ti: ee942000 task.ti: ee942000
PC is at do_raw_spin_lock+0x14/0x1c0
LR is at _raw_spin_lock+0x28/0x2c
pc : [<c016e69c>]    lr : [<c0a9f608>]    psr: 000f0013
sp : ee943d98  ip : ee943dc0  fp : ee943dbc
r10: 00000000  r9 : ed8a1f80  r8 : fffffff0
r7 : eea57d40  r6 : c0d5c764  r5 : ffffffe8  r4 : fffffff0
r3 : ee948000  r2 : 00000001  r1 : c0d5c77e  r0 : fffffff0
Flags: nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
Control: 10c5387d  Table: 6da7406a  DAC: 00000051
Process systemd (pid: 1, stack limit = 0xee942210)
Stack: (0xee943d98 to 0xee944000)
3d80:                                                       fffffff0 ffffffe8
3da0: c0d5c764 eea57d40 fffffff0 ed8a1f80 ee943dd4 ee943dc0 c0a9f608 c016e694
3dc0: 00000004 00000000 ee943dfc ee943dd8 c0271bf8 c0a9f5ec 00000000 c0d5c7ec
3de0: 00000000 ed5f9428 ee314480 ed8a1f80 ee943e24 ee943e00 c0202e40 c0271ba4
(Continue reading)

Jan Kara | 26 May 18:19 2016
Picon

[PATCH 0/5] fs: Avoid premature clearing of file capabilities

Hello,

this patch series is my attempt to fix an issue when user can clear capabilites
of arbitrary file he can look up for example by running chown on it (this got
assigned CVE-2015-1350). The problem is that we call security_inode_killpriv()
before checking permissions in inode_change_ok(). This patch set moves
that call into inode_change_ok() after permissions are checked - the only
trouble is that we need to give dentry instead of inode there and that is
not completely trivial in some cases - I'd like to have a review from XFS,
Ceph, and FUSE people to verify I didn't miss anything. Anyway, have a look
how the result looks like...

								Honza
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Jan Kara | 26 May 17:02 2016
Picon

[PATCH 1/2] posix_acl: Add inode parameter to posix_acl_equiv_mode()

To decide whether we need to clear SGID bit we need to know inode the
acl belongs to. Pass it as an argument to posix_acl_equiv_mode().

Signed-off-by: Jan Kara <jack <at> suse.cz>
---
 fs/9p/acl.c               | 2 +-
 fs/btrfs/acl.c            | 2 +-
 fs/ceph/acl.c             | 4 ++--
 fs/ext2/acl.c             | 3 ++-
 fs/ext4/acl.c             | 3 ++-
 fs/f2fs/acl.c             | 3 ++-
 fs/gfs2/acl.c             | 2 +-
 fs/hfsplus/posix_acl.c    | 2 +-
 fs/jffs2/acl.c            | 2 +-
 fs/jfs/acl.c              | 2 +-
 fs/nfs/nfs3acl.c          | 2 +-
 fs/ocfs2/acl.c            | 2 +-
 fs/orangefs/acl.c         | 2 +-
 fs/posix_acl.c            | 5 +++--
 fs/reiserfs/xattr_acl.c   | 3 ++-
 fs/xfs/xfs_acl.c          | 2 +-
 include/linux/posix_acl.h | 2 +-
 17 files changed, 24 insertions(+), 19 deletions(-)

See patch 2/2 for more detailed explanation why this is necessary...

diff --git a/fs/9p/acl.c b/fs/9p/acl.c
index eb3589edf485..c3bd7dd20fac 100644
--- a/fs/9p/acl.c
+++ b/fs/9p/acl.c
(Continue reading)

Krzysztof Błaszkowski | 26 May 16:45 2016
Picon

freevxfs: hp-ux support. patchset 1-7/7

Hi,

So then let it roll. 

Thanks

From 3d3b4e1ed5df014ae191e0566ff86a17d7d9ac05 Mon Sep 17 00:00:00 2001
From: KB <kb <at> sysmikro.com.pl>
Date: Wed, 25 May 2016 21:50:11 +0200
Subject: [PATCH 1/7] kconfig note

Signed-off-by: KB <kb <at> sysmikro.com.pl>
---
 fs/freevxfs/Kconfig |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/fs/freevxfs/Kconfig b/fs/freevxfs/Kconfig
index 8dc1cd5..a4c9075 100644
--- a/fs/freevxfs/Kconfig
+++ b/fs/freevxfs/Kconfig
 <at>  <at>  -5,12 +5,20  <at>  <at>  config VXFS_FS
 	  FreeVxFS is a file system driver that support the VERITAS VxFS(TM)
 	  file system format.  VERITAS VxFS(TM) is the standard file system
 	  of SCO UnixWare (and possibly others) and optionally available
-	  for Sunsoft Solaris, HP-UX and many other operating systems.
+	  for Sunsoft Solaris, HP-UX and many other operating systems. However
+	  these particular OS implementations of vxfs may differ in on-disk
+	  data endianess and/or superblock offset. The vxfs module has been 
+	  tested with SCO UnixWare and HP-UX B.10.20 (pa-risc 1.1 arch.)
 	  Currently only readonly access is supported.
(Continue reading)

hubcap | 26 May 16:31 2016

[PATCH] Orangefs: pseudo-support O_DIRECT, or, O_DIRECT as a hint.

From: Mike Marshall <hubcap <at> omnibond.com>

Allow userspace applications to use O_DIRECT in open without failing
on EINVAL.

Signed-off-by: Mike Marshall <hubcap <at> omnibond.com>
---

There was a thread about making O_DIRECT a hint a few weeks ago -
always allow it, and just let the file system deal with it however
it wants. I know that would make some OrangeFS users happy, so in the
mean time, here is a patch that will make OrangeFS allow O_DIRECT, if
y'all think it looks OK, I'd like to try to get it pulled...

 fs/orangefs/inode.c | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c
index 85640e9..df53830 100644
--- a/fs/orangefs/inode.c
+++ b/fs/orangefs/inode.c
 <at>  <at>  -124,19 +124,17  <at>  <at>  static int orangefs_releasepage(struct page *page, gfp_t foo)
  * will need to be able to use O_DIRECT on open in order to support
  * AIO. Modeled after NFS, they do this too.
  */
-/*
- * static ssize_t orangefs_direct_IO(int rw,
- *			struct kiocb *iocb,
- *			struct iov_iter *iter,
- *			loff_t offset)
(Continue reading)

Krzysztof Błaszkowski | 25 May 23:27 2016
Picon

freevxfs

Hi,

Please find included patchset which addresses all major features we have
discussed (unless I forgot about something).

I verified correctness of operation with my regression tests and HP-UX's
vxfs image. No difference spotted. However I can't do this with SCO
image because I do not have such. I reckon that it is highly possible
that SCO image will work as usual because the only difference is data
endianess and offset of super block.

I included for reference these scripts just in case one is curious.
(chksum8-sorted.log comes from hp-ux's cksum)

Regards,
--

-- 
Krzysztof Blaszkowski
Attachment (0001-kconfig-note.patch): text/x-patch, 1614 bytes
Attachment (0006-static-cachep.patch): text/x-patch, 3330 bytes
Attachment (0007-the-credits.patch): text/x-patch, 3313 bytes
Attachment (Check.sh): application/x-shellscript, 180 bytes
Attachment (cksum8-sorted.log): text/x-log, 5629 bytes
Attachment (Test3d.sh): application/x-shellscript, 923 bytes
Gavin Chang | 25 May 16:53 2016
Picon

Bug in chardev checking of overlapping ranges(send again as TEXT/PLAIN)

Hi,

I'm a new person to learn Linux kernel.

In fs/char_dev.c function __register_chrdev_region(), there is the
following code:

for (cp = &chrdevs[i]; *cp; cp = &(*cp)->next)
if ((*cp)->major > major ||
    ((*cp)->major == major &&
     (((*cp)->baseminor >= baseminor) ||
      ((*cp)->baseminor + (*cp)->minorct > baseminor))))
break;

/* Check for overlapping minor ranges.  */
if (*cp && (*cp)->major == major) {
int old_min = (*cp)->baseminor;
int old_max = (*cp)->baseminor + (*cp)->minorct - 1;
int new_min = baseminor;
int new_max = baseminor + minorct - 1;

/* New driver overlaps from the left.  */
if (new_max >= old_min && new_max <= old_max) {
ret = -EBUSY;
goto out;
}

/* New driver overlaps from the right.  */
if (new_min <= old_max && new_min >= old_min) {
ret = -EBUSY;
(Continue reading)

Andreas Gruenbacher | 25 May 13:30 2016
Picon

[PATCH] fuse: Document that dentry is unused in getxattr

For consistency with the other filesystems, rename the dentry argument
to "unused" here.

Signed-off-by: Andreas Gruenbacher <agruenba <at> redhat.com>
---
 fs/fuse/dir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index b941905..5760e27 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
 <at>  <at>  -1755,7 +1755,7  <at>  <at>  static int fuse_setxattr(struct dentry *entry, const char *name,
 	return err;
 }

-static ssize_t fuse_getxattr(struct dentry *entry, struct inode *inode,
+static ssize_t fuse_getxattr(struct dentry *unused, struct inode *inode,
 			     const char *name, void *value, size_t size)
 {
 	struct fuse_conn *fc = get_fuse_conn(inode);
--

-- 
2.5.5

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

(Continue reading)

Andreas Gruenbacher | 25 May 12:29 2016
Picon

[PATCH 0/3] Minor orangefs xattr cleanups

Mike,

here are three patches that clean up small glitches in orangefs xattrs.  Please
merge.

Thanks,
Andreas

Andreas Gruenbacher (3):
  orangefs: Remove useless defines
  orangefs: Remove redundant "trusted." xattr handler
  orangefs: Remove useless xattr prefix arguments

 fs/orangefs/acl.c             |  17 +++---
 fs/orangefs/file.c            |   2 -
 fs/orangefs/orangefs-kernel.h |  13 -----
 fs/orangefs/xattr.c           | 124 +++++++++---------------------------------
 4 files changed, 34 insertions(+), 122 deletions(-)

--

-- 
2.5.5

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Gmane