Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am looking at a 2008 academic test paper from a university on secure computing. I could not think of any solution to on particular question.
*******************************************************************
Basically a user has a file in a directory and there is another directory nested inside which is owned by root. The nested directory has a file which is owned by root and user cant access it.
There is a root program which user can invoke which basically checking the permission on user file and creates a symbolic link to it for a few moments and deletes it after use.
This program has a flaw and user has found a way to access the secret file. what could be wrong?
*******************************************************************
Clearly the root program has a race condition vulnerability but how can a user actually exploit it to gain access to root file? This is what is puzzling me. I am attaching the screen shot of the complete question.
Even a hard link could not work. The access permissions are part of the file's inode, and are independent of how that inode is reached. A hard link could work around directory permissions, but not file permissions. A symbolic link can do neither.
Yes I have gone through this. It exploits the race condition and symbolic links to write to an inaccessible file because the root program which is running is writing to the file and it can be tricked to redirect its input to some other file but in this case the root program is merely creating a symbolic link not opening the file.
The most an attacker could do is to create a symbolic link of file in folder C to imitate his image file apart from that nothing. So how can he gian access to the secret file?
So the program checks if "the user can view the file" by writing to the file? That doesn't seem like a plausible error. I mean, even in normal non-attacker scenarios wouldn't that cause obvious problems? Maybe that is the intended answer, but IMO it doesn't make much sense.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.