Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3215
b: refs/heads/master
c: 6b99219
h: refs/heads/master
i:
  3213: 8160506
  3211: fb21590
  3207: a08e1d3
  3199: 243006f
v: v3
  • Loading branch information
Lorenzo Hernandez Garc�a-Hierro authored and Linus Torvalds committed Jun 25, 2005
1 parent a25f005 commit 53592b5
Show file tree
Hide file tree
Showing 4 changed files with 13 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: 2d15cab85b85a56cc886037cab43cc292923ff22
refs/heads/master: 6b9921976f0861e04828b3aff66696c1f3fd900d
10 changes: 10 additions & 0 deletions trunk/security/selinux/hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -2488,6 +2488,16 @@ static int selinux_file_mprotect(struct vm_area_struct *vma,
if (rc)
return rc;
}
if (!vma->vm_file && (prot & PROT_EXEC) &&
vma->vm_start <= vma->vm_mm->start_stack &&
vma->vm_end >= vma->vm_mm->start_stack) {
/* Attempt to make the process stack executable.
* This has an additional execstack check.
*/
rc = task_has_perm(current, current, PROCESS__EXECSTACK);
if (rc)
return rc;
}
#endif

return file_map_prot_check(vma->vm_file, prot, vma->vm_flags&VM_SHARED);
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 @@ -70,6 +70,7 @@
S_(SECCLASS_PROCESS, PROCESS__DYNTRANSITION, "dyntransition")
S_(SECCLASS_PROCESS, PROCESS__SETCURRENT, "setcurrent")
S_(SECCLASS_PROCESS, PROCESS__EXECMEM, "execmem")
S_(SECCLASS_PROCESS, PROCESS__EXECSTACK, "execstack")
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 @@ -465,6 +465,7 @@
#define PROCESS__DYNTRANSITION 0x00800000UL
#define PROCESS__SETCURRENT 0x01000000UL
#define PROCESS__EXECMEM 0x02000000UL
#define PROCESS__EXECSTACK 0x04000000UL

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

0 comments on commit 53592b5

Please sign in to comment.