[lkml]   [2006]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] set*uid() must not fail-and-return on OOM/rlimits
    On Sun, Aug 20, 2006 at 07:52:59PM +0100, Alan Cox wrote:
    > Ar Sul, 2006-08-20 am 20:21 +0200, ysgrifennodd Willy Tarreau:
    > > Arjan proposed to add a __must_check on the set*uid() function in glibc.
    > > I think that if killing the program is what makes you nervous, we could
    > > at least print a warning in the kernel logs so that the admin of a machine
    > > being abused has a chance to detect what's going on. Would you accept
    > > something like this ?
    > That ratelimited doesn't sound unreasonable - you want to know its
    > happening whatever the cause. You could do it with the kernel or with
    > the audit daemon I guess.


    2.4 has no printk_ratelimit() function and I'm not sure it's worth adding
    one for only this user. One could argue that once it's implemented, we can
    uncomment some other warnings that are currently disabled due to lack of

    In this special case (set*uid), the only reason we might fail is because
    kmem_cache_alloc(uid_cachep, SLAB_KERNEL) would return NULL. Do you think
    it could intentionnally be tricked into failing, or that under OOM we might
    bother about the excess of messages ?

    If so I can backport the printk_ratelimit() function, I would just like an
    advice on this.


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2006-08-20 21:05    [W:0.027 / U:14.884 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site