[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <171526518127.18413.18287613546076931026.b4-ty@linaro.org>
Date: Thu, 9 May 2024 16:33:08 +0200
From: Bartosz Golaszewski <brgl@...ev.pl>
To: brgl@...ev.pl,
warthog618@...il.com,
linus.walleij@...aro.org,
Zhongqiu Han <quic_zhonhan@...cinc.com>
Cc: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>,
linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] gpiolib: cdev: Fix use after free in lineinfo_changed_notify
From: Bartosz Golaszewski <bartosz.golaszewski@...aro.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@...aro.org>
Powered by blists - more mailing lists