Crispin Cowan wrote:<small> I have actually hacked a system by renaming /etc/passwd in this way. /etc was owned by user "bin", and I had a login as "bin" due to a misfeature in some program. So I substituted another /etc/passwd, and gave myself a root shell. </small> The trouble with access control on the parent directory is that occasionally some human accidentally forgets how important that is, thinking that permissions on the /etc/shadow file are important. Also *programs* care about a file with that name. They reference it by name, apply security decisions based on a process which starts with that name. So the name is the most relevant point of communication between the policy setter and programs which need to be affected. So I think AppArmor's approach is good here. But insufficient here. If you rename /etc/shadow legitimately, after changing a password, there might be a program which still has a handle to the _old_ inode and is still reading it, still comparing a password against its contents. If policy was entirely name based, so modifications may be possible to that file after it's renamed from /etc/shadow to /etc/shadow.bak, _while_ some programs are still reading it (because it was /etc/shadow when they opened it, and they got swapped for a moment), that's a failure. So you *should* care about the integrity of an inode that was previously known as /etc/shadow - at least until you can prove that nobody is still dependent on it's earlier security properties. That's a garbage collection problem. Both are race conditions. I agree that the current name is meaningful, but it's not watertight when your systems change. To avoid unexpected weaknesses, you'll need to apply the intersection of permissions over a time period, using name based policy but having it follow renames until you can prove it's safe to release the following. -- Jamie -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Ingo Molnar | Re: [patch] paravirt: VDSO page is essential |
| Johannes Weiner | Re: Versioning file system |
| Matt Mackall | [PATCH 1/13] maps: Uninline some functions in the page walker |
| Greg KH | [patch 00/49] 2.6.25-stable review |
git: | |
| Johannes Schindelin | Re: [PATCH 1/4] Move redo merge code in a function |
| Dmitry Potapov | Re: [RFC] Git User's Survey 2008 |
| Johannes Schindelin | Re: [PATCH] Teach 'git apply' to look at $GIT_DIR/config |
| Shawn O. Pearce | Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins |
| Brian A. Seklecki | sshd_config(5) PermitRootLogin yes |
| Richard Stallman | Real men don't attack straw men |
| ropers | Re: low-MHz server |
| Diego Fernando Nieto Moreno | Intel DG33 Support |
| Holger Schurig | Re: Linux Wireless Mini-Summit -- Ottawa -- July 22, 2008 |
| Tilman Schmidt | Re: 2.6.25-rc8: FTP transfer errors |
| Eric Dumazet | Re: [rfc][patch 3/3] use SLAB_ALIGN_SMP |
| Lennert Buytenhek | [PATCH 21/39] mv643xx_eth: move port_receive() into its only caller |
| high memory | 13 hours ago | Linux kernel |
| semaphore access speed | 16 hours ago | Applications and Utilities |
| the kernel how to power off the machine | 17 hours ago | Linux kernel |
| Easter Eggs in windows XP | 20 hours ago | Windows |
| Shared swap partition | 21 hours ago | Linux general |
| Root password | 21 hours ago | Linux general |
| Where/when DNOTIFY is used? | 23 hours ago | Linux kernel |
| How to convert Linux Kernel built-in module into a loadable module | 1 day ago | Linux kernel |
| Linux 2.6.24 and I/O schedulers | 1 day ago | Linux kernel |
| USB Driver -- Interrupt Polling -- A Little Help Please | 1 day ago | Linux general |
