Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 36468 - Smart FileSystem Permissions - hb-working-features.xml-1.6.diff
Summary: Smart FileSystem Permissions - hb-working-features.xml-1.6.diff
Status: RESOLVED FIXED
Alias: None
Product: [OLD] Docs-user
Classification: Unclassified
Component: Handbook (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Sven Vermeulen (RETIRED)
URL: http://dev.gentoo.org/~solar/xml/hb-w...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-24 23:39 UTC by solar (RETIRED)
Modified: 2003-12-25 10:40 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description solar (RETIRED) gentoo-dev 2003-12-24 23:39:03 UTC
Handbook addition of sfperms

http://dev.gentoo.org/~solar/xml/hb-working-features.xml-1.6.diff
Comment 1 Sven Vermeulen (RETIRED) gentoo-dev 2003-12-25 01:47:35 UTC
Very neat; what is the idea behind "go-r" for setuids and "o-r" for setgids? 
Comment 2 solar (RETIRED) gentoo-dev 2003-12-25 08:53:50 UTC
Often times a local attacker/malicious user could use system tools such
as objdump,readelf to learn information such as offsets and symbol
resolution about these files which then could be used in crafting
exploits.

Here are a few examples where this basic sanity could of helped.
http://www.securityfocus.com/archive/1/171708/2003-11-28/2003-12-04/2

http://downloads.securityfocus.com/vulnerabilities/exploits/su-exp.c

In this example we see
------------------------------------------------------------
if (!(st.st_mode & S_IROTH)) {
    printf("failed. /bin/su it's not +r\naborting\n");
    exit(0);
}
------------------------------------------------------------

Thus sucessful exploitation could of not happened in this case.  This
would force the attacker use to a brute force method to try to evaluate
his/her privs.

When this sanity is in place and coupled with a kernel that has ASLR
(such as PAX,grsec) even the brute force method becomes really hard to
ever guess correctly. Roughly a 2^16 chance but of course this depends
on the situation like in which region you need an address or how many
addresses you have to guess at once, how many bits you can ignore in the
randomization (e.g. if u can send duplicates of the payload scattered in
memory in some pattern), etc..
Comment 3 Sven Vermeulen (RETIRED) gentoo-dev 2003-12-25 10:40:17 UTC
Okay, thanks. Committed.