History

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security

Pull security docs update from James Morris. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: security: Minor improvements to no_new_privs documentation

Linus Torvalds committed 14 years ago

Commit a0127af2 parents 332a2e1 c5405212 files · +9 −0Browse files

Unified · Split

2 files
  1. Documentation/prctl/no_new_privs.txt +7 −0
  2. include/linux/prctl.h +2 −0
Documentation/prctl/no_new_privs.txt+7−0
@@ -25,6 +25,13 @@ bits will no longer change the uid or gid; file capabilities will not · 24 unmodified lines
25add to the permitted set, and LSMs will not relax constraints after25add to the permitted set, and LSMs will not relax constraints after
26execve.26execve.
27 27
28To set no_new_privs, use prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0).
29
30Be careful, though: LSMs might also not tighten constraints on exec
31in no_new_privs mode. (This means that setting up a general-purpose
32service launcher to set no_new_privs before execing daemons may
33interfere with LSM-based sandboxing.)
34
28Note that no_new_privs does not prevent privilege changes that do not35Note that no_new_privs does not prevent privilege changes that do not
29involve execve. An appropriately privileged task can still call36involve execve. An appropriately privileged task can still call
30setuid(2) and receive SCM_RIGHTS datagrams.37setuid(2) and receive SCM_RIGHTS datagrams.
include/linux/prctl.h+2−0
@@ -141,6 +141,8 @@ · 140 unmodified lines
141 * Changing LSM security domain is considered a new privilege. So, for example,141 * Changing LSM security domain is considered a new privilege. So, for example,
142 * asking selinux for a specific new context (e.g. with runcon) will result142 * asking selinux for a specific new context (e.g. with runcon) will result
143 * in execve returning -EPERM.143 * in execve returning -EPERM.
144 *
145 * See Documentation/prctl/no_new_privs.txt for more details.
144 */146 */
145#define PR_SET_NO_NEW_PRIVS 38147#define PR_SET_NO_NEW_PRIVS 38
146#define PR_GET_NO_NEW_PRIVS 39148#define PR_GET_NO_NEW_PRIVS 39

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t