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

From
David Howells <dhowells@redhat.com>
Date
2018-07-11 07:25:35
Also in
linux-fsdevel, lkml
Reply to
Andy Lutomirski, 2018-07-11
Andy Lutomirski [off-list ref] wrote:
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().

David
Thread (64 messages) 64 messages, 11 authors, last reply 2019-10-09
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help