zfs posix default permissions lost on reboot or unmount

Bug #1574801 reported by Kyle Peterson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
High
Colin Ian King
Xenial
Fix Released
Undecided
Unassigned
Yakkety
Fix Released
High
Colin Ian King

Bug Description

[SRU Justification][XENIAL]
Commit 4967a3e introduced a typo that caused the ZPL to store the
intended default ACL as an access ACL. Due to caching this problem
may not become visible until the filesystem is remounted or the inode
is evicted from the cache.

[FIX]
https://github.com/zfsonlinux/zfs/commit/98f03691a4c08f38ca4538c468e9523f8e6b24be

[TESTCASE]
from https://github.com/zfsonlinux/zfs/issues/4520:

[root@localhost ~]# cd /mnt/data/
[root@localhost data]# mkdir test_dir
[root@localhost data]# setfacl -R --mask -m u:uadm:rwX test_dir/
[root@localhost data]# setfacl -R -d --mask -m u:uadm:rwX test_dir/
[root@localhost data]# getfacl test_dir/
# file: test_dir/
# owner: root
# group: root
user::rwx
user:uadm:rwx
group::r-x
mask::rwx
other::r-x
default:user::rwx
default:user:uadm:rwx
default:group::r-x
default:mask::rwx
default:other::r-x

[root@localhost data]# reboot

After a reboot without the fix one gets the following ACLs:

[root@localhost ~]# cd /mnt/data/
[root@localhost data]# getfacl test_dir/
# file: test_dir/
# owner: root
# group: root
user::rwx
user:uadm:rwx
group::r-x
mask::rwx
other::r-x

With the fix:

[root@localhost data]# getfacl test_dir/
# file: test_dir/
# owner: root
# group: root
user::rwx
user:uadm:rwx
group::r-x
mask::rwx
other::r-x
default:user::rwx
default:user:uadm:rwx
default:group::r-x
default:mask::rwx
default:other::r-x

[REGRESSION POTENTAL]
Minimal ZFS only and touches just acl setting. This corrects just the ACL_TYPE_DEFAULT case for the ACL setting for ZFS, and sets it to the *correct* name. It is a trivial one line fix.

----------------------------------------------

Ubuntu 16.04 server

Problem: Posix default permissions on zfs datasets are lost after rebooting the server or unmounting/remount.

See here for details and fix: https://github.com/zfsonlinux/zfs/issues/4520

---
AlsaDevices:
 total 0
 crw-rw----+ 1 root audio 116, 1 Apr 24 22:44 seq
 crw-rw----+ 1 root audio 116, 33 Apr 24 22:44 timer
AplayDevices: Error: [Errno 2] No such file or directory
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
DistroRelease: Ubuntu 16.04
HibernationDevice: RESUME=/dev/mapper/ubuntu--vg-swap_1
IwConfig: Error: [Errno 2] No such file or directory
MachineType: To be filled by O.E.M. To be filled by O.E.M.
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl
Package: linux (not installed)
PciMultimedia:

ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcFB:
 0 nouveaufb
 1 astdrmfb
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.4.0-21-generic root=/dev/mapper/hostname--vg-root ro
ProcVersionSignature: Ubuntu 4.4.0-21.37-generic 4.4.6
RelatedPackageVersions:
 linux-restricted-modules-4.4.0-21-generic N/A
 linux-backports-modules-4.4.0-21-generic N/A
 linux-firmware 1.157
RfKill: Error: [Errno 2] No such file or directory
Tags: xenial
Uname: Linux 4.4.0-21-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

_MarkForUpload: True
dmi.bios.date: 07/23/2013
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 6702
dmi.board.asset.tag: To be filled by O.E.M.
dmi.board.name: P8B-X series
dmi.board.vendor: ASUSTeK Computer INC.
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 17
dmi.chassis.vendor: To Be Filled By O.E.M.
dmi.chassis.version: To Be Filled By O.E.M.
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr6702:bd07/23/2013:svnTobefilledbyO.E.M.:pnTobefilledbyO.E.M.:pvrTobefilledbyO.E.M.:rvnASUSTeKComputerINC.:rnP8B-Xseries:rvr:cvnToBeFilledByO.E.M.:ct17:cvrToBeFilledByO.E.M.:
dmi.product.name: To be filled by O.E.M.
dmi.product.version: To be filled by O.E.M.
dmi.sys.vendor: To be filled by O.E.M.

CVE References

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1574801/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
affects: ubuntu → linux (Ubuntu)
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1574801

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Kyle Peterson (kyle-peterson1) wrote : CRDA.txt

apport information

tags: added: apport-collected xenial
description: updated
Revision history for this message
Kyle Peterson (kyle-peterson1) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Kyle Peterson (kyle-peterson1) wrote : JournalErrors.txt

apport information

Revision history for this message
Kyle Peterson (kyle-peterson1) wrote : Lspci.txt

apport information

Revision history for this message
Kyle Peterson (kyle-peterson1) wrote : Lsusb.txt

apport information

Revision history for this message
Kyle Peterson (kyle-peterson1) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Kyle Peterson (kyle-peterson1) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Kyle Peterson (kyle-peterson1) wrote : ProcModules.txt

apport information

Revision history for this message
Kyle Peterson (kyle-peterson1) wrote : UdevDb.txt

apport information

Revision history for this message
Kyle Peterson (kyle-peterson1) wrote : WifiSyslog.txt

apport information

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Changed in linux (Ubuntu):
status: Confirmed → In Progress
importance: Undecided → High
assignee: nobody → Colin Ian King (colin-king)
description: updated
Revision history for this message
Colin Ian King (colin-king) wrote :
Changed in linux (Ubuntu Xenial):
status: New → Fix Committed
Revision history for this message
Kamal Mostafa (kamalmostafa) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-xenial' to 'verification-done-xenial'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-xenial
Revision history for this message
Kyle Peterson (kyle-peterson1) wrote :

It might be better to just upgrade zfs to 0.6.5.7. The fix for this and several other important issues are included in 0.6.5.7.

Tim Gardner (timg-tpi)
Changed in linux (Ubuntu Yakkety):
status: In Progress → Fix Released
Revision history for this message
Kyle Peterson (kyle-peterson1) wrote :

Proposed kernel did fix the issue.

tags: added: verification-done-xenial
removed: verification-needed-xenial
Revision history for this message
Colin Ian King (colin-king) wrote :

Strange, I just tested this with the -proposed kernel 4.4.0.23-generic #41-Ubuntu (built May 16) and I cannot reproduce the issue, were as the previous kernel I could reproduce the issue. So from my point of view, it is fixed.

Revision history for this message
Colin Ian King (colin-king) wrote :

And verified fixed on my configuration too.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 4.4.0-24.43

---------------
linux (4.4.0-24.43) xenial; urgency=low

  [ Kamal Mostafa ]

  * CVE-2016-1583 (LP: #1588871)
    - ecryptfs: fix handling of directory opening
    - SAUCE: proc: prevent stacking filesystems on top
    - SAUCE: ecryptfs: forbid opening files without mmap handler
    - SAUCE: sched: panic on corrupted stack end

  * arm64: statically link rtc-efi (LP: #1583738)
    - [Config] Link rtc-efi statically on arm64

 -- Kamal Mostafa <email address hidden> Fri, 03 Jun 2016 10:02:16 -0700

Changed in linux (Ubuntu Xenial):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.