All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Lee Jones <lee.jones@linaro.org>
Cc: stable@vger.kernel.org, Daniel Rosenberg <drosen@google.com>,
	Dennis Cagle <d-cagle@codeaurora.org>,
	Patrick Daly <pdaly@codeaurora.org>
Subject: Re: [PATCH 4.9 1/3] ion: Fix use after free during ION_IOC_ALLOC
Date: Mon, 24 Jan 2022 19:31:14 +0100	[thread overview]
Message-ID: <Ye7wcqssa5RuvwQe@kroah.com> (raw)
In-Reply-To: <20220124161243.1029417-1-lee.jones@linaro.org>

On Mon, Jan 24, 2022 at 04:12:41PM +0000, Lee Jones wrote:
> From: Daniel Rosenberg <drosen@google.com>
> 
> If a user happens to call ION_IOC_FREE during an ION_IOC_ALLOC
> on the just allocated id, and the copy_to_user fails, the cleanup
> code will attempt to free an already freed handle.
> 
> This adds a wrapper for ion_alloc that adds an ion_handle_get to
> avoid this.
> 
> Signed-off-by: Daniel Rosenberg <drosen@google.com>
> Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
> Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/staging/android/ion/ion-ioctl.c | 14 +++++++++-----
>  drivers/staging/android/ion/ion.c       | 15 ++++++++++++---
>  drivers/staging/android/ion/ion.h       |  4 ++++
>  3 files changed, 25 insertions(+), 8 deletions(-)

What is the git commit id of this in Linus's tree (same for the other
2)?

And why just 4.9?  What about 4.14 and newer kernels?

thanks,

greg k-h

  parent reply	other threads:[~2022-01-24 18:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-24 16:12 [PATCH 4.9 1/3] ion: Fix use after free during ION_IOC_ALLOC Lee Jones
2022-01-24 16:12 ` [PATCH 4.9 2/3] ion: Protect kref from userspace manipulation Lee Jones
2022-01-24 16:12 ` [PATCH 4.9 3/3] ion: Do not 'put' ION handle until after its final use Lee Jones
2022-01-24 18:31 ` Greg KH [this message]
2022-01-25  9:21   ` [PATCH 4.9 1/3] ion: Fix use after free during ION_IOC_ALLOC Lee Jones
2022-01-25 10:26     ` Greg KH

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=Ye7wcqssa5RuvwQe@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=d-cagle@codeaurora.org \
    --cc=drosen@google.com \
    --cc=lee.jones@linaro.org \
    --cc=pdaly@codeaurora.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.