[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADnq5_PUcuUHj_mzfGNxyo4RiqJnTBg1VdHBJObJVq9AejcJsQ@mail.gmail.com>
Date: Mon, 13 May 2013 10:47:23 -0400
From: Alex Deucher <alexdeucher@...il.com>
To: Kees Cook <keescook@...omium.org>
Cc: linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
David Howells <dhowells@...hat.com>,
Dave Jones <davej@...hat.com>,
Dave Airlie <airlied@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [RESEND][PATCH] drm/radeon: check incoming cliprects pointer
On Mon, May 13, 2013 at 1:00 AM, Kees Cook <keescook@...omium.org> wrote:
> The "boxes" parameter points into userspace memory. It should be verified
> like any other operation against user memory.
>
> Signed-off-by: Kees Cook <keescook@...omium.org>
> Cc: stable@...r.kernel.org
Thanks. Applied.
Alex
> ---
> drivers/gpu/drm/radeon/r300_cmdbuf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/r300_cmdbuf.c b/drivers/gpu/drm/radeon/r300_cmdbuf.c
> index 865e2c9..60170ea 100644
> --- a/drivers/gpu/drm/radeon/r300_cmdbuf.c
> +++ b/drivers/gpu/drm/radeon/r300_cmdbuf.c
> @@ -75,7 +75,7 @@ static int r300_emit_cliprects(drm_radeon_private_t *dev_priv,
> OUT_RING(CP_PACKET0(R300_RE_CLIPRECT_TL_0, nr * 2 - 1));
>
> for (i = 0; i < nr; ++i) {
> - if (DRM_COPY_FROM_USER_UNCHECKED
> + if (DRM_COPY_FROM_USER
> (&box, &cmdbuf->boxes[n + i], sizeof(box))) {
> DRM_ERROR("copy cliprect faulted\n");
> return -EFAULT;
> --
> 1.7.9.5
>
>
> --
> Kees Cook
> Chrome OS Security
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists