netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Leon Romanovsky <leon@kernel.org>
Cc: Nir Levy <bhr166@gmail.com>,
	davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
	linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org
Subject: Re: [PATCH net v2] net: atm: Fix use-after-free bug in atm_dev_register()
Date: Wed, 14 Dec 2022 08:43:58 -0800	[thread overview]
Message-ID: <20221214084358.161f9d6f@kernel.org> (raw)
In-Reply-To: <Y5mAbfpeHEuQp0BE@unreal>

On Wed, 14 Dec 2022 09:51:09 +0200 Leon Romanovsky wrote:
> > Also atm_dev_register() still frees the dev on atm_register_sysfs()
> > failure, is that okay?  
> 
> Yes, the kernel panic points that class_dev (not dev) had use-after-free.

How is that possible? "class_dev" is embedded in dev (struct atm_dev).

  reply	other threads:[~2022-12-14 16:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-11 12:49 [PATCH net v2] net: atm: Fix use-after-free bug in atm_dev_register() Nir Levy
2022-12-12  7:12 ` Leon Romanovsky
2022-12-14  3:12   ` Jakub Kicinski
2022-12-14  7:51     ` Leon Romanovsky
2022-12-14 16:43       ` Jakub Kicinski [this message]
2022-12-14 19:17         ` Leon Romanovsky

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=20221214084358.161f9d6f@kernel.org \
    --to=kuba@kernel.org \
    --cc=bhr166@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=leon@kernel.org \
    --cc=linux-atm-general@lists.sourceforge.net \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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;
as well as URLs for NNTP newsgroup(s).