lkml.org 
[lkml]   [2005]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 6/7] procfs privacy: /proc/kallsyms
From
Date
This patch changes the permissions of the procfs entry kallsyms, thus,
non-root users are restricted from accessing it.

It's also available at:
http://pearls.tuxedo-es.org/patches/security/proc-privacy-1_kernel_kallsyms.c.patch

--
Lorenzo Hernández García-Hierro <lorenzo@gnu.org>
[1024D/6F2B2DEC] & [2048g/9AE91A22][http://tuxedo-es.org]
diff -puN kernel/kallsyms.c~proc-privacy-1 kernel/kallsyms.c
--- linux-2.6.11/kernel/kallsyms.c~proc-privacy-1 2005-04-17 18:06:01.380119984 +0200
+++ linux-2.6.11-lorenzo/kernel/kallsyms.c 2005-04-17 18:06:27.378167680 +0200
@@ -388,7 +388,7 @@ int __init kallsyms_init(void)
{
struct proc_dir_entry *entry;

- entry = create_proc_entry("kallsyms", 0444, NULL);
+ entry = create_proc_entry("kallsyms", S_IFREG | S_IRUSR, NULL);
if (entry)
entry->proc_fops = &kallsyms_operations;
return 0;[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-04-18 21:05    [W:0.018 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site