On Fri, Feb 4, 2011 at 11:11 PM, Eric W. Biederman wrote: >> +static int __sysctl_check_table(struct nsproxy *namespaces, >> +     struct ctl_table *table, struct ctl_table **parents, int depth) >>  { >> +     const char *fail = NULL; >>       int error = 0; >> + >> +     if (depth >= CTL_MAXNAME) { > > This should be depth > CTL_MAXNAME.  Because there are only CTL_MAXNAME > entries in the array. A bit lower in the array we access 'parents[depth]'. So the correct check should be (depth >= CTL_MAXNAME) => error. >> -                     sysctl_check_leaf(namespaces, table, &fail); >> +                     parents[depth] = table; >> +                     sysctl_check_leaf(namespaces, table, &fail, >> +                                       parents, depth); >>               } >> +             if (table->child) { >> +                     parents[depth] = table; >> +                     error |= __sysctl_check_table(namespaces, table->child, >> +                                                   parents, depth + 1); >> +             } --  . ..: Lucian {.n++%ݶw{.n+{G{ayʇڙ,jfhz_(階ݢj"mG?&~iOzv^m ?I