lkml.org 
[lkml]   [2011]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] [226/275] Prevent rt_sigqueueinfo and rt_tgsigqueueinfo from spoofing the signal code
    On 03/30, Andi Kleen wrote:
    >
    > --- linux-2.6.35.y.orig/kernel/signal.c 2011-03-29 22:50:25.616602954 -0700
    > +++ linux-2.6.35.y/kernel/signal.c 2011-03-29 23:03:02.941224912 -0700
    > @@ -2410,9 +2410,13 @@
    > return -EFAULT;
    >
    > /* Not even root can pretend to send signals from the kernel.
    > - Nor can they impersonate a kill(), which adds source info. */
    > - if (info.si_code >= 0)
    > + * Nor can they impersonate a kill()/tgkill(), which adds source info.
    > + */
    > + if (info.si_code != SI_QUEUE) {
    > + /* We used to allow any < 0 si_code */
    > + WARN_ON_ONCE(info.si_code < 0);
    > return -EPERM;

    Oh, please don't.

    Quoting Roland:

    Commit da48524eb206 ("Prevent rt_sigqueueinfo and rt_tgsigqueueinfo
    from spoofing the signal code") made the check on si_code too strict:
    glibc's aio implementation wants to queue signals with SI_ASYNCIO, and
    indeed glibc's tst-aio4 fails with the patched kernel.

    If stable needs this change, then it probably needs

    Relax si_code check in rt_sigqueueinfo and rt_tgsigqueueinfo
    commit 243b422af9ea9af4ead07a8ad54c90d4f9b6081a

    as well.

    Oleg.



    \
     
     \ /
      Last update: 2011-03-30 23:37    [W:4.028 / U:0.028 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site