proc: making "limits" world readable
RFC PATCH 1/1 proc: making "limits" world readable
hi,
I'd like to have the /proc/<pid>/limits file world readable, but I'm not sure this could cause some security issue.. thoughts?
The "limit" file was as a debug feature by following commit:
- proc: export a processes resource limits via /proc/pid commit d85f50d5e1aa99ab082035f94265847521819e58
Author: Neil Horman <[email protected]>
thanks for any ideas,
jirka
--- fs/proc/base.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
fs/proc/base.c +2 -2
@@ -2675,7 +2675,7 @@ static const struct pid_entry tgid_base_stuff[] = {INF ("auxv" ,S_IRUSR , proc_pid_auxv),ONE ("status" ,S_IRUGO , proc_pid_status),ONE ("personality" ,S_IRUSR , proc_pid_personality), -INF ("limits" ,S_IRUSR , proc_pid_limits), +INF ("limits" ,S_IRUGO , proc_pid_limits), #ifdef CONFIG_SCHED_DEBUG REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations), #endif
@@ -3011,7 +3011,7 @@ static const struct pid_entry tid_base_stuff[] = {INF ("auxv" ,S_IRUSR , proc_pid_auxv),ONE ("status" ,S_IRUGO , proc_pid_status),ONE ("personality" ,S_IRUSR , proc_pid_personality), -INF ("limits" ,S_IRUSR , proc_pid_limits), +INF ("limits" ,S_IRUGO , proc_pid_limits), #ifdef CONFIG_SCHED_DEBUG REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations), #endif
Signature · 1 line
1.7.1
Quoted 3 lines · On Tue, 21 Sep 2010 11:10:55 +0200 Jiri Olsa <[email protected]> wrote:
hi,
I'd like to have the /proc/<pid>/limits file world readable,
Why?
Quoted 36 lines
but I'm not sure this could cause some security issue.. thoughts?
The "limit" file was as a debug feature by following commit:
- proc: export a processes resource limits via/proc/pidcommitd85f50d5e1aa99ab082035f94265847521819e58
Author: Neil Horman <[email protected]>thanks for any ideas,
jirka--- fs/proc/base.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)fs/proc/base.c +2
-2@@ -2675,7 +2675,7 @@ static const struct pid_entry tgid_base_stuff[] = {INF ("auxv" ,S_IRUSR , proc_pid_auxv),ONE ("status" ,S_IRUGO , proc_pid_status),ONE ("personality" ,S_IRUSR , proc_pid_personality), -INF ("limits" ,S_IRUSR , proc_pid_limits), +INF ("limits" ,S_IRUGO , proc_pid_limits), #ifdef CONFIG_SCHED_DEBUG REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations), #endif@@ -3011,7 +3011,7 @@ static const struct pid_entry tid_base_stuff[] = {INF ("auxv" ,S_IRUSR , proc_pid_auxv),ONE ("status" ,S_IRUGO , proc_pid_status),ONE ("personality" ,S_IRUSR , proc_pid_personality), -INF ("limits" ,S_IRUSR , proc_pid_limits), +INF ("limits" ,S_IRUGO , proc_pid_limits), #ifdef CONFIG_SCHED_DEBUG REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations), #endif
Quoted 9 lines · Andrew Morton
Quoted 3 lines · On Tue, 21 Sep 2010 11:10:55 +0200 Jiri Olsa <[email protected]> wrote:
hi,
I'd like to have the /proc/<pid>/limits file world readable,
Why?
having this will ease the task of system management for large install bases and where root privileges might be restricted
jirka
Quoted 37 lines
Quoted 36 lines
but I'm not sure this could cause some security issue.. thoughts?
The "limit" file was as a debug feature by following commit:
- proc: export a processes resource limits via/proc/pidcommitd85f50d5e1aa99ab082035f94265847521819e58
Author: Neil Horman <[email protected]>thanks for any ideas,
jirka--- fs/proc/base.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)fs/proc/base.c +2
-2@@ -2675,7 +2675,7 @@ static const struct pid_entry tgid_base_stuff[] = {INF ("auxv" ,S_IRUSR , proc_pid_auxv),ONE ("status" ,S_IRUGO , proc_pid_status),ONE ("personality" ,S_IRUSR , proc_pid_personality), -INF ("limits" ,S_IRUSR , proc_pid_limits), +INF ("limits" ,S_IRUGO , proc_pid_limits), #ifdef CONFIG_SCHED_DEBUG REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations), #endif@@ -3011,7 +3011,7 @@ static const struct pid_entry tid_base_stuff[] = {INF ("auxv" ,S_IRUSR , proc_pid_auxv),ONE ("status" ,S_IRUGO , proc_pid_status),ONE ("personality" ,S_IRUSR , proc_pid_personality), -INF ("limits" ,S_IRUSR , proc_pid_limits), +INF ("limits" ,S_IRUGO , proc_pid_limits), #ifdef CONFIG_SCHED_DEBUG REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations), #endif
Neil Horman
Acked-byQuoted 8 lines · Jiri Olsa
Quoted 7 lines · Andrew Morton
Quoted 3 lines · On Tue, 21 Sep 2010 11:10:55 +0200 Jiri Olsa <[email protected]> wrote:
hi,
I'd like to have the /proc/<pid>/limits file world readable,
Quoted 8 lines
Quoted 2 lines
Why?
having this will ease the task of system management for large install bases and where root privileges might be restricted
jirka
I don't see a problem with making this file world readable. Doing so would be in keeping with most of the other stats bearing files in /proc/<pid>. The only reason I didn't make it world readable was because the getrlimit sematics previously kept limit information private to the process, and I didn't want to deviate from that. But as long as we're not making it world writeable I think we're ok.
Quoted 17 lines · On Fri, 24 Sep 2010 12:20:07 -0400 Neil Horman <[email protected]> wrote:
Quoted 8 lines · Jiri Olsa
Quoted 7 lines · Andrew Morton
Quoted 3 lines · On Tue, 21 Sep 2010 11:10:55 +0200 Jiri Olsa <[email protected]> wrote:
hi,
I'd like to have the /proc/<pid>/limits file world readable,
Quoted 8 lines
Quoted 2 lines
Why?
having this will ease the task of system management for large install bases and where root privileges might be restricted
jirka
Quoted 9 lines
I don't see a problem with making this file world readable. Doing so would be in keeping with most of the other stats bearing files in /proc/<pid>. The only reason I didn't make it world readable was because the getrlimit sematics previously kept limit information private to the process, and I didn't want to deviate from that. But as long as we're not making it world writeable I think we're ok.
Acked-by Neil Horman <[email protected]>
hm, OK, I can't really think of any realistic problem with exposing limits.
The original patch had no signoff. Please resend, with a changelog which includes a *good* rationale for making the change. For example, a use case.
PATCH v2 1/1 proc: making "limits" world readable
Quoted 27 lines · Andrew Morton
Quoted 24 lines · On Fri, 24 Sep 2010 12:20:07 -0400 Neil Horman <[email protected]> wrote:
Quoted 8 lines · Jiri Olsa
Quoted 7 lines · Andrew Morton
Quoted 3 lines · On Tue, 21 Sep 2010 11:10:55 +0200 Jiri Olsa <[email protected]> wrote:
hi,
I'd like to have the /proc/<pid>/limits file world readable,
Quoted 8 lines
Quoted 2 lines
Why?
having this will ease the task of system management for large install bases and where root privileges might be restricted
jirka
I don't see a problem with making this file world readable. Doing so would be in keeping with most of the other stats bearing files in /proc/<pid>. The only reason I didn't make it world readable was because the getrlimit sematics previously kept limit information private to the process, and I didn't want to deviate from that. But as long as we're not making it world writeable I think we're ok.
Quoted 9 lines
Quoted 2 lines
Acked-by Neil Horman <[email protected]>hm, OK, I can't really think of any realistic problem with exposing limits.
The original patch had no signoff. Please resend, with a changelog which includes a *good* rationale for making the change. For example, a use case.
thanks for feedback, the patch is attached
jirka
---
making the /proc/<pid>/limits file world readable.
Having the limits file world readable will ease the task of system management on systems where root privileges might be restricted.
Having admin restricted with root proviledges, he/she could not check other users process' limits.
Also it'd align with most of the /proc stat files.
wbr,
jirka
--- fs/proc/base.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
fs/proc/base.c +2 -2
@@ -2675,7 +2675,7 @@ static const struct pid_entry tgid_base_stuff[] = {INF ("auxv" ,S_IRUSR , proc_pid_auxv),ONE ("status" ,S_IRUGO , proc_pid_status),ONE ("personality" ,S_IRUSR , proc_pid_personality), -INF ("limits" ,S_IRUSR , proc_pid_limits), +INF ("limits" ,S_IRUGO , proc_pid_limits), #ifdef CONFIG_SCHED_DEBUG REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations), #endif
@@ -3011,7 +3011,7 @@ static const struct pid_entry tid_base_stuff[] = {INF ("auxv" ,S_IRUSR , proc_pid_auxv),ONE ("status" ,S_IRUGO , proc_pid_status),ONE ("personality" ,S_IRUSR , proc_pid_personality), -INF ("limits" ,S_IRUSR , proc_pid_limits), +INF ("limits" ,S_IRUGO , proc_pid_limits), #ifdef CONFIG_SCHED_DEBUG REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations), #endif
Signature · 1 line
1.7.1
Quoted 51 lines · Jiri Olsa
Quoted 27 lines · Andrew Morton
Quoted 24 lines · On Fri, 24 Sep 2010 12:20:07 -0400 Neil Horman <[email protected]> wrote:
Quoted 8 lines · Jiri Olsa
Quoted 7 lines · Andrew Morton
Quoted 3 lines · On Tue, 21 Sep 2010 11:10:55 +0200 Jiri Olsa <[email protected]> wrote:
hi,
I'd like to have the /proc/<pid>/limits file world readable,
Quoted 8 lines
Quoted 2 lines
Why?
having this will ease the task of system management for large install bases and where root privileges might be restricted
jirka
I don't see a problem with making this file world readable. Doing so would be in keeping with most of the other stats bearing files in /proc/<pid>. The only reason I didn't make it world readable was because the getrlimit sematics previously kept limit information private to the process, and I didn't want to deviate from that. But as long as we're not making it world writeable I think we're ok.
Quoted 9 lines
Quoted 2 lines
Acked-by Neil Horman <[email protected]>hm, OK, I can't really think of any realistic problem with exposing limits.
The original patch had no signoff. Please resend, with a changelog which includes a *good* rationale for making the change. For example, a use case.
thanks for feedback, the patch is attached
jirka
---
making the /proc/<pid>/limits file world readable.Having the limits file world readable will ease the task of system management on systems where root privileges might be restricted.
Having admin restricted with root proviledges, he/she could not check other users process' limits.
Quoted 7 lines
Also it'd align with most of the /proc stat files.
wbr,
jirkaSigned-off-by Jiri Olsa <[email protected]>
Quoted 17 lines · Neil Horman
Quoted 8 lines · Jiri Olsa
Quoted 7 lines · Andrew Morton
Quoted 3 lines · On Tue, 21 Sep 2010 11:10:55 +0200 Jiri Olsa<[email protected]> wrote:
hi,
I'd like to have the /proc/<pid>/limits file world readable,
Quoted 8 lines
Quoted 2 lines
Why?
having this will ease the task of system management for large install bases and where root privileges might be restricted
jirka
Quoted 8 lines
I don't see a problem with making this file world readable. Doing so would be in keeping with most of the other stats bearing files in /proc/<pid>. The only reason I didn't make it world readable was because the getrlimit sematics previously kept limit information private to the process, and I didn't want to deviate from that. But as long as we're not making it world writeable I think we're ok.
Acked-by Neil Horman<[email protected]>
I agree with Neil. I can't see how this can be a problem as long as it is just world-readable.
Eugene
Signature · 1 line
main(i) { putchar(182623909 >> (i-1) * 5&31|!!(i<7)<<6) && main(++i); }