public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Willy Tarreau <w@1wt.eu>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Solar Designer <solar@openwall.com>,
	Alex Riesen <fork0@users.sourceforge.net>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] set*uid() must not fail-and-return on OOM/rlimits
Date: Sun, 20 Aug 2006 21:17:22 +0200	[thread overview]
Message-ID: <20060820191722.GQ602@1wt.eu> (raw)
In-Reply-To: <1156102407.4051.47.camel@localhost.localdomain>

On Sun, Aug 20, 2006 at 08:33:27PM +0100, Alan Cox wrote:
> Ar Sul, 2006-08-20 am 21:01 +0200, ysgrifennodd Willy Tarreau:
> > 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
> > ratelimit.
> 
> Agreed. But if it isnt ratelimited then people will be able to use it
> flush other "interesting" log messages out of existance...
> 
> > 
> > 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.
> 
> If there are multiple potential users then a backport might be sensible

Ok, I will proceed that way then. I see at least two places in binfmt_elf :

   631                  if ((interpreter_type & INTERPRETER_ELF) &&
   632                       interpreter_type != INTERPRETER_ELF) {
   633                          // FIXME - ratelimit this before re-enabling
   634                          // printk(KERN_WARNING "ELF: Ambiguous type, using ELF\n");
   635                          interpreter_type = INTERPRETER_ELF;
   636                  }


   824                  if (BAD_ADDR(elf_entry)) {
   825                          printk(KERN_ERR "Unable to load interpreter %.128s\n",
   826                                  elf_interpreter);
   827                          force_sig(SIGSEGV, current);
   828                          retval = IS_ERR((void *)elf_entry) ? PTR_ERR((void *)elf_entry) : -ENOEXEC;
   829                          goto out_free_dentry;
   830                  }

The first one might be interesting, while the second one should definitely
be ratelimited or removed.

Thanks,
willy


  reply	other threads:[~2006-08-20 19:18 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-20  0:38 [PATCH] set*uid() must not fail-and-return on OOM/rlimits Solar Designer
2006-08-20  7:52 ` Kari Hurtta
2006-08-20 18:10   ` Alan Cox
2006-08-21  5:05     ` Kari Hurtta
2006-08-20  8:26 ` Willy Tarreau
2006-08-20 15:25   ` Solar Designer
2006-08-20 10:07 ` Alex Riesen
2006-08-20 15:30   ` Solar Designer
2006-08-20 15:53     ` Arjan van de Ven
2006-08-20 16:17       ` Willy Tarreau
2006-08-20 16:28       ` Ulrich Drepper
2006-08-20 16:45         ` Arjan van de Ven
2006-08-20 16:47         ` Michael Buesch
2006-08-20 16:48         ` Solar Designer
2006-08-20 18:03     ` Alan Cox
2006-08-20 18:10       ` Willy Tarreau
2006-08-20 18:36         ` Alan Cox
2006-08-20 18:21           ` Willy Tarreau
2006-08-20 18:52             ` Alan Cox
2006-08-20 19:01               ` Willy Tarreau
2006-08-20 19:33                 ` Alan Cox
2006-08-20 19:17                   ` Willy Tarreau [this message]
2006-08-20 16:04 ` Florian Weimer
2006-08-20 16:25   ` Solar Designer
2006-08-20 18:14 ` Alan Cox
2006-08-20 22:12   ` Solar Designer
2006-08-20 22:51     ` Alan Cox
2006-08-20 22:58       ` Solar Designer
2006-08-20 23:00       ` Alan Cox
2006-08-21  0:23       ` Peter Williams
2006-08-21  0:45         ` Solar Designer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060820191722.GQ602@1wt.eu \
    --to=w@1wt.eu \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=fork0@users.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=solar@openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox