linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Xiaochen Zou <xzou017@ucr.edu>
Cc: stable@vger.kernel.org, netdev@vger.kernel.org,
	linux-can@vger.kernel.org
Subject: Re: [PATCH 0/1] can: fix a potential UAF access in j1939_session_deactivate()
Date: Wed, 14 Jul 2021 08:49:25 +0200	[thread overview]
Message-ID: <YO6I9cvLuYUg+mM7@kroah.com> (raw)
In-Reply-To: <aa64ef28-35d8-9deb-2756-8080296b7e3e@ucr.edu>

On Tue, Jul 13, 2021 at 01:21:44PM -0700, Xiaochen Zou wrote:
> 
> Xiaochen Zou (1):
>   can: fix a potential UAF access in j1939_session_deactivate(). Both
>     session and session->priv may be freed in
>     j1939_session_deactivate_locked(). It leads to potential UAF read
>     and write in j1939_session_list_unlock(). The free chain is
> 
> j1939_session_deactivate_locked()->j1939_session_put()->__j1939_session_release()->j1939_session_destroy().
>     To fix this bug, I moved j1939_session_put() behind
>     j1939_session_deactivate_locked(), and guarded it with a check of
>     active since the session would be freed only if active is true.
> 
>  net/can/j1939/transport.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> -- 
> 2.17.1


Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch was attached, please place it inline so that it can be
  applied directly from the email message itself.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

      reply	other threads:[~2021-07-14  6:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-13 20:21 [PATCH 0/1] can: fix a potential UAF access in j1939_session_deactivate() Xiaochen Zou
2021-07-14  6:49 ` Greg KH [this message]

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=YO6I9cvLuYUg+mM7@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-can@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=xzou017@ucr.edu \
    /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;
as well as URLs for NNTP newsgroup(s).