From: Bartosz Golaszewski <brgl@bgdev.pl>
To: brgl@bgdev.pl, warthog618@gmail.com, linus.walleij@linaro.org,
Zhongqiu Han <quic_zhonhan@quicinc.com>
Cc: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] gpiolib: cdev: Fix use after free in lineinfo_changed_notify
Date: Thu, 9 May 2024 16:33:08 +0200 [thread overview]
Message-ID: <171526518127.18413.18287613546076931026.b4-ty@linaro.org> (raw)
In-Reply-To: <20240505141156.2944912-1-quic_zhonhan@quicinc.com>
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
On Sun, 05 May 2024 22:11:56 +0800, Zhongqiu Han wrote:
> The use-after-free issue occurs as follows: when the GPIO chip device file
> is being closed by invoking gpio_chrdev_release(), watched_lines is freed
> by bitmap_free(), but the unregistration of lineinfo_changed_nb notifier
> chain failed due to waiting write rwsem. Additionally, one of the GPIO
> chip's lines is also in the release process and holds the notifier chain's
> read rwsem. Consequently, a race condition leads to the use-after-free of
> watched_lines.
>
> [...]
Applied, thanks!
[1/1] gpiolib: cdev: Fix use after free in lineinfo_changed_notify
commit: 02f6b0e1ec7e0e7d059dddc893645816552039da
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
prev parent reply other threads:[~2024-05-09 14:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-05 14:11 [PATCH v2] gpiolib: cdev: Fix use after free in lineinfo_changed_notify Zhongqiu Han
2024-05-07 8:00 ` Bartosz Golaszewski
2024-05-07 12:09 ` Zhongqiu Han
2024-05-09 14:33 ` Bartosz Golaszewski [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=171526518127.18413.18287613546076931026.b4-ty@linaro.org \
--to=brgl@bgdev.pl \
--cc=bartosz.golaszewski@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_zhonhan@quicinc.com \
--cc=warthog618@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 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 read-only IMAP folder(s) and NNTP newsgroup(s).