mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Lorenzo Hernández García-Hierro" <lorenzo@gnu.org>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH 7/7] procfs privacy:  /proc/iomem & /proc/ioports
Date: Mon, 18 Apr 2005 20:57:48 +0200	[thread overview]
Message-ID: <1113850668.17341.88.camel@localhost.localdomain> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 517 bytes --]

This patch changes the permissions of the procfs entries ioports and
iomem to restrict non-root users from accessing them.

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

(last patch from the procfs privacy patch-set)

The whole patch is available at:
http://pearls.tuxedo-es.org/patches/security/proc-privacy-1.patch

Cheers,
-- 
Lorenzo Hernández García-Hierro <lorenzo@gnu.org> 
[1024D/6F2B2DEC] & [2048g/9AE91A22][http://tuxedo-es.org]

[-- Attachment #1.2: proc-privacy-1_kernel_resource.c.patch --]
[-- Type: text/x-patch, Size: 678 bytes --]

diff -puN kernel/resource.c~proc-privacy-1 kernel/resource.c
--- linux-2.6.11/kernel/resource.c~proc-privacy-1	2005-04-17 18:06:56.221782784 +0200
+++ linux-2.6.11-lorenzo/kernel/resource.c	2005-04-17 18:07:55.685742888 +0200
@@ -136,10 +136,10 @@ static int __init ioresources_init(void)
 {
 	struct proc_dir_entry *entry;
 
-	entry = create_proc_entry("ioports", 0, NULL);
+	entry = create_proc_entry("ioports", S_IRUSR, NULL);
 	if (entry)
 		entry->proc_fops = &proc_ioports_operations;
-	entry = create_proc_entry("iomem", 0, NULL);
+	entry = create_proc_entry("iomem", S_IRUSR, NULL);
 	if (entry)
 		entry->proc_fops = &proc_iomem_operations;
 	return 0;

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

                 reply	other threads:[~2005-04-18 19:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1113850668.17341.88.camel@localhost.localdomain \
    --to=lorenzo@gnu.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®