From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Kees Cook <keescook@chromium.org>
Cc: linux-kernel@vger.kernel.org, Ming Lei <ming.lei@canonical.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH v2] firmware: make sure paths remain relative
Date: Tue, 18 Dec 2012 22:02:23 +0000 [thread overview]
Message-ID: <20121218220223.5ae69bf0@pyramind.ukuu.org.uk> (raw)
In-Reply-To: <20121218210449.GA3329@www.outflux.net>
On Tue, 18 Dec 2012 13:04:49 -0800
Kees Cook <keescook@chromium.org> wrote:
> Some devices have configurable firmware locations. If these configuration
> mechanisms are exposed to unprivileged userspace, it may be possible to
> load firmware from an unexpected location. To minimize the risk of this,
> make sure the string "../" does not appear in the firmware name. This
> means that neither the users of request_firmware, nor the uevent handler
> have to do this filtering themselves.
Have you verified no existing distribution ever does this ?
> + if (strstr(name, "../")) {
and this is obviously buggy and hasn't been tested
Hint foo/bar../baz
You need to check for ^../ /../ and /..$
Alan
next prev parent reply other threads:[~2012-12-18 21:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-18 21:04 Kees Cook
2012-12-18 22:02 ` Alan Cox [this message]
2012-12-18 22:10 ` Kees Cook
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=20121218220223.5ae69bf0@pyramind.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=gregkh@linuxfoundation.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.lei@canonical.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®