From: Greg KH <gregkh@linuxfoundation.org>
To: Quentin Casasnovas <quentin.casasnovas@oracle.com>
Cc: David Airlie <airlied@linux.ie>,
stable@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i915: stack address leak when failing to read registers.
Date: Mon, 2 Feb 2015 08:38:52 -0800 [thread overview]
Message-ID: <20150202163852.GB7055@kroah.com> (raw)
In-Reply-To: <1422885516-533-1-git-send-email-quentin.casasnovas@oracle.com>
On Mon, Feb 02, 2015 at 02:58:36PM +0100, Quentin Casasnovas wrote:
> It is possible for the *_read*() functions to fail, in which case it'll
> leave its third argument untouched. Most of the code do not check the
> return value of *_read*() functions, and will happily use garbage from the
> stack to test various things. For example, ch7xxx_dump_regs() will leak 1
> byte from the stack in case of failure, ivch_dump_regs() 2 bytes, etc.
>
> Instead of fixing every caller to check the return value, just clear the
> output variable so this patch can easily go to -stable. A proper fix would
> probably to check the return value everywhere though, since it does not
> make much sense to carry on talking to the ship after some error.
>
> This issue was found by code review while preparing Ksplice updates.
>
> Signed-off-by: Quentin Casasnovas <quentin.casasnovas@oracle.com>
> ---
> drivers/gpu/drm/i915/dvo_ch7017.c | 1 +
> drivers/gpu/drm/i915/dvo_ch7xxx.c | 1 +
> drivers/gpu/drm/i915/dvo_ivch.c | 1 +
> drivers/gpu/drm/i915/dvo_ns2501.c | 2 +-
> drivers/gpu/drm/i915/dvo_sil164.c | 1 +
> drivers/gpu/drm/i915/dvo_tfp410.c | 1 +
> 6 files changed, 6 insertions(+), 1 deletion(-)
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read Documentation/stable_kernel_rules.txt
for how to do this properly.
</formletter>
next prev parent reply other threads:[~2015-02-02 16:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-02 13:58 Quentin Casasnovas
2015-02-02 16:38 ` Greg KH [this message]
2015-02-26 16:03 ` Quentin Casasnovas
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=20150202163852.GB7055@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=airlied@linux.ie \
--cc=linux-kernel@vger.kernel.org \
--cc=quentin.casasnovas@oracle.com \
--cc=stable@vger.kernel.org \
/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®