Re: [PATCH ghak57 V2] selinux: format all invalid context as untrusted

From: Paul Moore
Date: Mon Jul 01 2019 - 16:40:25 EST


On Thu, Jun 27, 2019 at 12:48 PM Richard Guy Briggs <rgb@xxxxxxxxxx> wrote:
>
> The userspace tools expect all fields of the same name to be logged
> consistently with the same encoding. Since the invalid_context fields
> contain untrusted strings in selinux_inode_setxattr()
> and selinux_setprocattr(), encode all instances of this field the same
> way as though they were untrusted even though
> compute_sid_handle_invalid_context() and security_sid_mls_copy() are
> trusted.
>
> Please see github issue
> https://github.com/linux-audit/audit-kernel/issues/57
>
> Signed-off-by: Richard Guy Briggs <rgb@xxxxxxxxxx>
> ---
> security/selinux/ss/services.c | 29 +++++++++++++++++++----------
> 1 file changed, 19 insertions(+), 10 deletions(-)

Generally rc6/rc7 is a bit late for things, but this is pretty
straightforward so I think it should be safe. Merged into
selinux/next.

--
paul moore
www.paul-moore.com