lkml.org 
[lkml]   [2024]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2] gpiolib: cdev: Fix use after free in lineinfo_changed_notify
Date
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>

\
 
 \ /
  Last update: 2024-05-09 16:33    [W:0.095 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site