From: Willy Tarreau <w@1wt.eu>
To: Ernie Petrides <petrides@redhat.com>
Cc: Solar Designer <solar@openwall.com>,
linux-kernel@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: printk()s of user-supplied strings
Date: Tue, 22 Aug 2006 22:34:36 +0200 [thread overview]
Message-ID: <20060822203436.GB12519@1wt.eu> (raw)
In-Reply-To: <200608222023.k7MKNHpH018036@pasta.boston.redhat.com>
Hi Ernie,
On Tue, Aug 22, 2006 at 04:23:17PM -0400, Ernie Petrides wrote:
> On Tuesday, 22-Aug-2006 at 7:7 +0400, Solar Designer wrote:
>
> > On Mon, Aug 21, 2006 at 07:36:01PM -0400, Ernie Petrides wrote:
> > > - printk(KERN_ERR "Unable to load interpreter %.128s\n",
> > > - elf_interpreter);
> >
> > I'd rather have this message rate-limited, not dropped completely.
>
> I consider any printk() that can be arbitrarily triggered by an
> unprivileged user to be inappropriate, rate-limited or not. I
> recommend that it be removed entirely.
Well, we had the same problem with the setuid() call where I proposed a
printk(), and Alan proposed to ratelimit it to prevent local user from
using it to flush the logs for instance, which I found clearly appropriate,
reason why I've backported 2.6's printk_ratelimit() function, citing the
two other printk() in binfmt_elf as good candidates.
> > Another long-time concern that I had is that we've got some printk()s
> > of user-supplied string data. What about embedded linefeeds - can this
> > be used to produce fake kernel messages with arbitrary log level (syslog
> > priority)? It certainly seems so.
> >
> > Also, there are terminal controls...
>
> These are valid concerns. Allowing the kernel to print user-fabricated
> strings is a terrible idea.
I agree. While this printk might have been there for years now, I really
think that it should be fixed for sensible chars, but then restored and
ratelimited to inform the admin that something abnormal is going on.
2.4.33.2 is out with the SCTP fix and this patch now, but with the printk
commented out.
Cheers,
Willy
next prev parent reply other threads:[~2006-08-22 20:48 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-20 2:04 [PATCH x7] misc fixes from 2.4.33-ow1 Solar Designer
2006-08-20 9:15 ` [PATCH] binfmt_elf.c : the BAD_ADDR macro again Willy Tarreau
2006-08-20 15:51 ` Solar Designer
2006-08-20 16:23 ` Willy Tarreau
2006-08-21 20:35 ` Ernie Petrides
2006-08-21 21:11 ` Willy Tarreau
2006-08-21 23:36 ` Ernie Petrides
2006-08-22 3:07 ` printk()s of user-supplied strings (Re: [PATCH] binfmt_elf.c : the BAD_ADDR macro again) Solar Designer
2006-08-22 20:23 ` Ernie Petrides
2006-08-22 20:34 ` Willy Tarreau [this message]
2006-08-24 16:44 ` Solar Designer
2006-08-24 16:46 ` Willy Tarreau
2006-08-26 2:29 ` Solar Designer
2006-08-26 8:22 ` Willy Tarreau
2006-08-26 23:13 ` Solar Designer
2006-08-27 20:04 ` printk()s of user-supplied strings Willy Tarreau
2006-08-28 1:52 ` Solar Designer
1970-01-01 0:16 ` Pavel Machek
2006-08-28 8:02 ` Willy Tarreau
2006-08-28 11:17 ` Krzysztof Halasa
2006-08-30 6:15 ` Willy Tarreau
2006-08-28 17:35 ` Valdis.Kletnieks
2006-08-22 4:36 ` [PATCH] binfmt_elf.c : the BAD_ADDR macro again Willy Tarreau
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=20060822203436.GB12519@1wt.eu \
--to=w@1wt.eu \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=petrides@redhat.com \
--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
all inboxes | Powered by JetHome®