From: Hyunwoo Kim <imv4bel@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: lkundrak@v3.sk, linux-kernel@vger.kernel.org, arnd@arndb.de,
linux@dominikbrodowski.net
Subject: Re: [PATCH v4] char: pcmcia: scr24x_cs: Fix use-after-free in scr24x_fops
Date: Mon, 19 Sep 2022 03:22:51 -0700 [thread overview]
Message-ID: <20220919102251.GA314226@ubuntu> (raw)
In-Reply-To: <Yyg6N+yS9YyAepFk@kroah.com>
On Mon, Sep 19, 2022 at 11:45:27AM +0200, Greg KH wrote:
> On Mon, Sep 19, 2022 at 02:38:01AM -0700, Hyunwoo Kim wrote:
> > A race condition may occur if the user physically removes the
> > pcmcia device while calling open() for this char device node.
> >
> > This is a race condition between the scr24x_open() function and
> > the scr24x_remove() function, which may eventually result in UAF.
> >
> > So, add a mutex to the scr24x_open() and scr24x_remove() functions
> > to avoid race contidion of krefs.
> >
> > Signed-off-by: Hyunwoo Kim <imv4bel@gmail.com>
> > Reported-by: kernel test robot <lkp@intel.com>
>
> The robot did not report this original problem :(
>
> > ---
> > drivers/char/pcmcia/scr24x_cs.c | 73 +++++++++++++++++++++++----------
> > 1 file changed, 52 insertions(+), 21 deletions(-)
>
> You failed to put below the --- line what changed from previous versions
> as the documentation asks for.
thank you for telling me.
I submitted a fixed v5 patch.
Regards,
Hyunwoo Kim.
prev parent reply other threads:[~2022-09-19 10:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-19 9:38 [PATCH v4] char: pcmcia: scr24x_cs: Fix use-after-free in scr24x_fops Hyunwoo Kim
2022-09-19 9:45 ` Greg KH
2022-09-19 10:22 ` Hyunwoo Kim [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=20220919102251.GA314226@ubuntu \
--to=imv4bel@gmail.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
--cc=lkundrak@v3.sk \
/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