mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] proc: Document why writing to /proc/pid/mem is a security hazard.
@ 2011-03-05  1:39 Stephen Wilson
  0 siblings, 0 replies; only message in thread
From: Stephen Wilson @ 2011-03-05  1:39 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Al Viro, linux-kernel, Stephen Wilson


Signed-off-by: Stephen Wilson <wilsons@start.ca>
---
 fs/proc/base.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/fs/proc/base.c b/fs/proc/base.c
index 9d096e8..9d55b7b 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -832,7 +832,11 @@ out_no_task:
 #define mem_write NULL
 
 #ifndef mem_write
-/* This is a security hazard */
+/*
+ * As implemented, mem_write would be a security hazard if enabled.  For
+ * example, the target task could exec a setuid-root binary between the
+ * permission check and the write into memory.
+ */
 static ssize_t mem_write(struct file * file, const char __user *buf,
 			 size_t count, loff_t *ppos)
 {
-- 
1.7.3.5


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-03-05  1:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-05  1:39 [PATCH] proc: Document why writing to /proc/pid/mem is a security hazard Stephen Wilson

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®