lkml.org 
[lkml]   [2010]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] security: Yama LSM
Hi Andi,

On Wed, Jun 23, 2010 at 01:43:41PM +0200, Andi Kleen wrote:
> Kees Cook <kees.cook@canonical.com> writes:
> > +
> > +config SECURITY_YAMA_SYMLINKS
> > + bool "Yama: protect symlink following in sticky world-writable
> > dirs"
>
> IMHO it's bad style to have CONFIGs that just set defaults,
> if that can be done at runtime too. Especially as in your case if it's
> a lot of settings. Is it that bad to have a init script and drop these
> CONFIGs?

Oh, er, I actually added these configs because Eric Paris recommended them
as handy for distributions. I'm fine with dropping them, but will I be
asked to add them back later? And what about the case of CONFIG_SYSCTL
being unset?

> However the help texts are useful, these should be in the sysctl
> documentatin in Documentation instead.

I documented the sysctls in Documentation/Yama.txt (where SELinux.txt and
Smack.txt live) should I create an additional file in Documentation/sysctl/
with that information (moved from Yama.txt) or move Yama.txt there?

> > + if (rc) {
> > + printk_ratelimited(KERN_INFO "ptrace of non-child"
> > + " pid %d was attempted by: %s (pid %d)\n",
> > + child->pid, get_task_comm(name, current),
> > + current->pid);
>
> It's probably obscure and other kernel code has this too, but at some point
> there were attacks to use terminal ESC sequences to attack root's
> terminal when they dmesg. Couldn't that be done through "comm" here?

I actually think this is a flaw in get_task_comm. (Though actually it's
the fault of terminals if they process dangerous escape sequences. Worst
case tends to just be confusing output, but that's not important --
nothing should spew non-printables regardless.) Would a patch to
get_task_comm be accepted to replace non-printables with "?" or something
when filling the buffer?

Thanks,

-Kees

--
Kees Cook
Ubuntu Security Team


\
 
 \ /
  Last update: 2010-06-23 16:57    [W:0.059 / U:0.916 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site