Thread (64 messages) flat view 64 messages, 11 authors, 2019-10-09

Re: [PATCH 24/32] vfs: syscall: Add fsopen() to prepare for superblock creation [ver #9]

From: Andy Lutomirski <luto@kernel.org>
Date: 2018-07-11 17:12:17
Also in: linux-fsdevel, lkml

Possibly related (same subject, not in this thread)

On Jul 11, 2018, at 12:22 AM, David Howells [off-list ref] wrote:

Andy Lutomirski [off-list ref] wrote:
quoted
quoted
  sfd = fsopen("ext4", FSOPEN_CLOEXEC);
  write(sfd, "s /dev/sdb1"); // note I'm ignoring write's length arg
Imagine some malicious program passes sfd as stdout to a setuid
program. That program gets persuaded to write "s /etc/shadow".  What
happens?  You’re okay as long as *every single fs* gets it right, but that’s
asking a lot.
Do note that you must already have CAP_SYS_ADMIN to be able to call fsopen().
If you’re not allowing it already, someone will want user namespace
root to be able to use this very, very soon.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help