Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3216
b: refs/heads/master
c: 09ffd94
h: refs/heads/master
v: v3
  • Loading branch information
Lorenzo Hern�ndez Garc�a-Hierro authored and Linus Torvalds committed Jun 25, 2005
1 parent 53592b5 commit 404051b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6b9921976f0861e04828b3aff66696c1f3fd900d
refs/heads/master: 09ffd94fb15d85fbf9eebb8180f50264b264d6fe
11 changes: 11 additions & 0 deletions trunk/security/selinux/hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -2477,6 +2477,17 @@ static int selinux_file_mprotect(struct vm_area_struct *vma,
prot = reqprot;

#ifndef CONFIG_PPC32
if ((prot & PROT_EXEC) && !(vma->vm_flags & VM_EXECUTABLE) &&
(vma->vm_start >= vma->vm_mm->start_brk &&
vma->vm_end <= vma->vm_mm->brk)) {
/*
* We are making an executable mapping in the brk region.
* This has an additional execheap check.
*/
rc = task_has_perm(current, current, PROCESS__EXECHEAP);
if (rc)
return rc;
}
if (vma->vm_file != NULL && vma->anon_vma != NULL && (prot & PROT_EXEC)) {
/*
* We are making executable a file mapping that has
Expand Down
1 change: 1 addition & 0 deletions trunk/security/selinux/include/av_perm_to_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
S_(SECCLASS_PROCESS, PROCESS__SETCURRENT, "setcurrent")
S_(SECCLASS_PROCESS, PROCESS__EXECMEM, "execmem")
S_(SECCLASS_PROCESS, PROCESS__EXECSTACK, "execstack")
S_(SECCLASS_PROCESS, PROCESS__EXECHEAP, "execheap")
S_(SECCLASS_MSGQ, MSGQ__ENQUEUE, "enqueue")
S_(SECCLASS_MSG, MSG__SEND, "send")
S_(SECCLASS_MSG, MSG__RECEIVE, "receive")
Expand Down
1 change: 1 addition & 0 deletions trunk/security/selinux/include/av_permissions.h
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@
#define PROCESS__SETCURRENT 0x01000000UL
#define PROCESS__EXECMEM 0x02000000UL
#define PROCESS__EXECSTACK 0x04000000UL
#define PROCESS__EXECHEAP 0x08000000UL

#define IPC__CREATE 0x00000001UL
#define IPC__DESTROY 0x00000002UL
Expand Down

0 comments on commit 404051b

Please sign in to comment.