Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 278573 - selinux_file_mmap always enforce mapping the 0 page
Summary: selinux_file_mmap always enforce mapping the 0 page
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Security
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-21 14:50 UTC by Brayan Arraes (YacK)
Modified: 2011-02-06 22:37 UTC (History)
0 users

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


Attachments
patch (patch,1.15 KB, patch)
2009-07-21 14:58 UTC, Brayan Arraes (YacK)
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brayan Arraes (YacK) 2009-07-21 14:50:24 UTC
Currently SELinux enforcement of controls on the ability to map the 0 page
is determined by the mmap_min_addr tunable.  This patch causes SELinux to
ignore the tunable and to always (but ONLY) protect the 0 page.

The tunable will now only control the need for CAP_SYS_RAWIO and SELinux
permissions will always protect the 0 page based on it's mmap_zero
permission.

This allows users who need to disable the mmap_min_addr controls (usual reason
being they run WINE as a non-root user) to do so and still have SELinux
controls preventing confined domains (like a web server) from being able to
map the 0 page.

Note: the additional SELinux restriction will now ONLY protect the 0 page.
CAP_SYS_RAWIO will protect anything between 0 and mmap_min_addr, but SELinux
will only protect between 0 and PAGE_SIZE.

Reproducible: Didn't try
Comment 1 Brayan Arraes (YacK) 2009-07-21 14:58:31 UTC
Created attachment 198709 [details, diff]
patch

patch found in the lkm
Comment 2 Chris Richards 2011-02-01 02:13:19 UTC
This bug appears to be resolved in the kernel as of 2.6.31 using the CONFIG_LSM_MMAP_MIN_ADDR parameter.  Can we close this bug?