Date: Tue, 20 Sep 2016 17:48:48 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 212861] [tmpfs] uchg files can be removed by root Message-ID: <bug-212861-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D212861 Bug ID: 212861 Summary: [tmpfs] uchg files can be removed by root Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: ngie@FreeBSD.org This issue seems to be present on tmpfs, only (it always returns EPERM on U= FS). Not sure about ZFS. Found by contrib/netbsd-tests/fs/tmpfs/t_remove.sh . The following command snippets demonstrate the repro: Invariant tested with UFS: $ touch /tmp/uchg.file $ chflags uchg /tmp/uchg.file $ rm -f /tmp/uchg.file rm: /tmp/uchg.file: Operation not permitted $ rm /tmp/uchg.file=20 override rw-r--r-- ngie/wheel uchg for /tmp/uchg.file? y rm: /tmp/uchg.file: Operation not permitted $ Invariant tested with tmpfs: $ mntpt=3D/tmp/tmpfs $ mkdir $mntpt $ sudo mount -t tmpfs tmpfs $mntpt $ cd $mntpt $ touch uchg.file; chflags uchg uchg.file $ rm -f uchg.file=20 rm: uchg.file: Operation not permitted $ sudo rm -f uchg.file=20 $ ls uchg.file=20 ls: uchg.file: No such file or directory $ --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-212861-8>