12 |
kernel/fork.c | 5 + |
kernel/fork.c | 5 + |
13 |
kernel/kexec.c | 3 |
kernel/kexec.c | 3 |
14 |
kernel/module.c | 5 + |
kernel/module.c | 5 + |
15 |
kernel/ptrace.c | 4 + |
kernel/ptrace.c | 10 ++ |
16 |
kernel/sched.c | 2 |
kernel/sched.c | 2 |
17 |
kernel/signal.c | 10 ++ |
kernel/signal.c | 10 ++ |
18 |
kernel/sys.c | 10 ++ |
kernel/sys.c | 10 ++ |
28 |
security/Kconfig | 2 |
security/Kconfig | 2 |
29 |
security/Makefile | 3 |
security/Makefile | 3 |
30 |
security/security.c | 137 ++++++++++++++++++++++++++++++++-------- |
security/security.c | 137 ++++++++++++++++++++++++++++++++-------- |
31 |
26 files changed, 245 insertions(+), 51 deletions(-) |
26 files changed, 251 insertions(+), 51 deletions(-) |
32 |
|
|
33 |
--- linux-2.6.34.10.orig/fs/compat.c |
--- linux-2.6.34.10.orig/fs/compat.c |
34 |
+++ linux-2.6.34.10/fs/compat.c |
+++ linux-2.6.34.10/fs/compat.c |
72 |
+ |
+ |
73 |
+static int __init ccs_show_version(void) |
+static int __init ccs_show_version(void) |
74 |
+{ |
+{ |
75 |
+ printk(KERN_INFO "Hook version: 2.6.34.10 2011/06/27\n"); |
+ printk(KERN_INFO "Hook version: 2.6.34.10 2012/03/08\n"); |
76 |
+ return 0; |
+ return 0; |
77 |
+} |
+} |
78 |
+module_init(ccs_show_version); |
+module_init(ccs_show_version); |
406 |
if (mutex_lock_interruptible(&module_mutex) != 0) |
if (mutex_lock_interruptible(&module_mutex) != 0) |
407 |
--- linux-2.6.34.10.orig/kernel/ptrace.c |
--- linux-2.6.34.10.orig/kernel/ptrace.c |
408 |
+++ linux-2.6.34.10/kernel/ptrace.c |
+++ linux-2.6.34.10/kernel/ptrace.c |
409 |
@@ -665,6 +665,8 @@ SYSCALL_DEFINE4(ptrace, long, request, l |
@@ -665,6 +665,11 @@ SYSCALL_DEFINE4(ptrace, long, request, l |
410 |
{ |
{ |
411 |
struct task_struct *child; |
struct task_struct *child; |
412 |
long ret; |
long ret; |
413 |
+ if (ccs_ptrace_permission(request, pid)) |
+ { |
414 |
+ return -EPERM; |
+ const int rc = ccs_ptrace_permission(request, pid); |
415 |
|
+ if (rc) |
416 |
|
+ return rc; |
417 |
|
+ } |
418 |
|
|
419 |
/* |
/* |
420 |
* This lock_kernel fixes a subtle race with suid exec |
* This lock_kernel fixes a subtle race with suid exec |
421 |
@@ -812,6 +814,8 @@ asmlinkage long compat_sys_ptrace(compat |
@@ -812,6 +817,11 @@ asmlinkage long compat_sys_ptrace(compat |
422 |
{ |
{ |
423 |
struct task_struct *child; |
struct task_struct *child; |
424 |
long ret; |
long ret; |
425 |
+ if (ccs_ptrace_permission(request, pid)) |
+ { |
426 |
+ return -EPERM; |
+ const int rc = ccs_ptrace_permission(request, pid); |
427 |
|
+ if (rc) |
428 |
|
+ return rc; |
429 |
|
+ } |
430 |
|
|
431 |
/* |
/* |
432 |
* This lock_kernel fixes a subtle race with suid exec |
* This lock_kernel fixes a subtle race with suid exec |