All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Minh Yuan <yuanmingbuaa@gmail.com>
Cc: linux-input@vger.kernel.org
Subject: Re: A concurrency uaf in psmouse_smbus_init
Date: Tue, 18 Jan 2022 18:47:37 -0800	[thread overview]
Message-ID: <Yed7yT+iA4fE++3R@google.com> (raw)
In-Reply-To: <CAH5WSp41FN6wjmKW0CsgODiyWDm0WAs-gucTcskdifqY3FQuRQ@mail.gmail.com>

Hi,

On Mon, Jan 17, 2022 at 10:17:25PM +0800, Minh Yuan wrote:
> Hi,
> 
> Our analysis tool detected  a potential concurrency UAF in
> psmouse_smbus_init in drivers/input/mouse/psmouse-smbus.c.
> 
> One possible thread interleaving is as follows:
> 
> Thread 1 Thread 2
> int psmouse_smbus_init(struct psmouse *psmouse, ...)
> {
> mutex_lock(&psmouse_smbus_mutex);
> list_add_tail(&smbdev->node, &psmouse_smbus_list);
> mutex_unlock(&psmouse_smbus_mutex);
> void psmouse_smbus_cleanup(struct psmouse *psmouse)

init and cleanup will not be running concurrently for the same device,
and smbus companion is not shared between psmouse istances.

Thanks.

-- 
Dmitry

           reply	other threads:[~2022-01-19  2:47 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <CAH5WSp41FN6wjmKW0CsgODiyWDm0WAs-gucTcskdifqY3FQuRQ@mail.gmail.com>]

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=Yed7yT+iA4fE++3R@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=yuanmingbuaa@gmail.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 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.