Re: [RFC v1] security: introduce ptrace_task_access_check()

From: Eric Paris
Date: Fri Jun 17 2011 - 11:44:02 EST


On 06/17/2011 11:29 AM, Vasiliy Kulikov wrote:
Hi,

This patch introduces ptrace_task_access_check() to be able to check
whether a specific task (not current) is able to ptrace another task
(might be current). I need it to call "reversed" ptrace_may_access()
with swapped current and target task.

Specifically, I need it to filter taskstats and proc connector requests
for a restriction of getting other processes' information:

http://permalink.gmane.org/gmane.linux.kernel/1155354


Please help me to figure out how such patch should be divided to be
applied. I think about such scheme:

1) add generic security/* functions.
2-4) add ptrace_task_access_check() for SMACK, AppArmor and SELinux.
5) change ptrace_access_check() in security ops and all LSMs to
ptrace_task_access_check().

But I'd like to hear maintainers' oppinions not to put useless efforts.

Not a real review, but I didn't instantly grok the need for the new cap functions. So maybe that's it's own patch with it's own change log. After that you should just add the 'parent' task to ptrace_access_check() and fix all of the LSMs to handle the new semantics at once. No need to rename the function or do a bunch of seperate patchs. All of us LSM authors can just ACK our little part and James can take the patch when everyone has their say. I think that will make history the cleanest.....

-Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/