Re: [PATCH] Realtime LSM

From: Jack O'Quin (joq_at_io.com)
Date: 09/16/04

  • Next message: Ray: "Save up to 80% by buying software online! josh jared"
    To: Jody McIntyre <realtime-lsm@modernduck.com>
    Date:	16 Sep 2004 13:27:02 -0500
    
    

    Jody McIntyre <realtime-lsm@modernduck.com> writes:

    > On Wed, Sep 15, 2004 at 11:48:29PM -0500, Jack O'Quin wrote:
    >
    > > What are the serialization issues with variable updates via /proc? I
    > > presume they can change at any time, even while the LSM is running on
    > > some other processor. If so, I'll need to be careful to fetch each
    > > variable only once and use that value for the entire capability
    > > computation, right? That should be straightforward.
    >
    > It doesn't matter. There's no added security risk if gid changes
    > halfway through the permission check, and the other variables are used
    > only once. It's probably cleaner to check the gid in a separate
    > function though.

    Agreed.

    One could probably get a false negative, but it's hard to imagine a
    sensible usage example. I just like to be tidy any time concurrency
    issues arise.

    > However, I just noticed something interesting:
    >
    > If "any" and "gid" is set, any is ignored and only the gid check is
    > effective. This is counter to the documentation, so I assume it is a
    > bug.

    Quite right, good eye. :-)

    I must not have tested that combination. :-(

    > I also added the sysctl interface to the documentation.

    Good. I thought about that, too.

    > > But, perhaps we should consider removing this option entirely. It is
    > > the only one with a potentially serious security exposure. The others
    > > at worst allow Denial of Service attacks.
    >
    > I hate allcaps too. Maybe you should just use a shell script wrapper
    > like (untested):
    >
    > ----
    > if echo uname -r |grep '^2\.4\.' ; then
    > jackstart $@
    > else
    > jackd $@
    > fi
    > ----

    I am willing to do that if the kernel developers think it better.

    It recently occurred to me that jackstart might be able to detect this
    situation and exec jackd, anyway. (AFAICT, the only reasonably
    POSIX-compliant method for detecting that a process has the
    "appropriate permission" to do something is trying it to see whether
    it returns EPERM.)

    Thanks for helping...

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

  • Next message: Ray: "Save up to 80% by buying software online! josh jared"

    Relevant Pages

    • Re: freed_symbols [Re: People, not GPL [was: Re: Driver Model]]
      ... > combined work and make it so others could not use that version without ... Not without being in violation of the original licence. ... but about your permission to use the ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: ? malware-like? behavior from Mozilla Firefox.
      ... without asking for permission, on this machine which runs Win98SE. ... Is Firefox software a security risk ... Thanks, dave ...
      (alt.computer.security)
    • License question
      ... Copyright 2002 Echo Digital Audio ... this Software without specific prior written permission. ... THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ... To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • Re: 2.6.12-rc4-mm2 - sleeping function called from invalid context at mm/slab.c:2502
      ... caller holding locks on relevant objects) for permission ... >> checking and must never sleep. ... > off the audit context's aux list which refers to them. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Proposal for a userspace "architecture portability" library
      ... clearly I can do this under the GPL. ... > either getting the permission of the authors of the kernel files, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)