lkml.org 
[lkml]   [2021]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 2/2] proc: ensure security hook is called after exec
On Fri, Dec 18, 2020 at 7:06 PM Stephen Brennan
<stephen.s.brennan@oracle.com> wrote:
>
> Smack needs its security_task_to_inode() hook to be called when a task
> execs a new executable. Store the self_exec_id of the task and call the
> hook via pid_update_inode() whenever the exec_id changes.
>
> Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>

Sorry to be late in responding, but the proc inode security structure
needs to be updated not only upon a context-changing exec but also
upon a setcon(3) aka write to /proc/self/attr/current just like the
uid/gid needs to be updated not only upon a setuid exec but also upon
a setuid(2). I'm also unclear as to why you can't call
security_task_to_inode during RCU lookup; it doesn't block/sleep
AFAICT.
All it does is take a spinlock and update a few fields.

\
 
 \ /
  Last update: 2021-01-04 15:18    [W:0.088 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site