proc: Document why writing to /proc/pid/mem is a security hazard.
PATCH 1/1 proc: Document why writing to /proc/pid/mem is a security hazard.
Signed-off-by Stephen Wilson <[email protected]>
--- fs/proc/base.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
fs/proc/base.c +5 -1
@@ -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) {
Signature · 1 line
1.7.3.5