Uh, no, that's impossible (without using root-only debug facilities). Doing so would be a massive security hole.
-
-
Replying to @marcan42
I’m fairly certain that it is possible to create a hard link to an inode even if you can’t access the directory that the other file linked to the inode is in.
@ssrjazz what do you think? o+w on the inode in question and +w on the directory I’m creating the new link in.1 reply 0 retweets 0 likes -
Replying to @DrScriptt @ssrjazz
Write the code, file the CVE, and get the sweet PoC karma then ;-)
1 reply 0 retweets 0 likes -
Nope. I don’t know how to do it myself. Besides I believe that I’ve read about it multiple times in the past. So nothing new.
1 reply 0 retweets 0 likes -
-
Quick search undeleting open files returns debugfs to create new links to an inode. You just need the inode number and a place to create the link.
2 replies 0 retweets 0 likes -
I’m confident that there are other ways to create a new link to an existing inode.
3 replies 0 retweets 0 likes -
I’m sure that I’ve read about people writing small programs to do exactly this.
2 replies 0 retweets 0 likes -
/bin/ln is not set uid. Seeing as how it can create hard links without root permission, I'm quite confident that root permission is not needed to create a (hard) link to a file.
1 reply 0 retweets 0 likes -
My understanding is that ln uses access to the existing file to identify the inode to create the link to.
1 reply 0 retweets 0 likes
Incorrect. The link(2) syscall takes two paths, not an inode and a path. At no point does /bin/ln get to decide what inode is linked. The entire process happens in the kernel.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.