Re: [PATCH] debugfs: Fix use-after-free in debugfs_create_devm_seqfile()

2021-04-04 Thread Greg Kroah-Hartman
On Sun, Apr 04, 2021 at 12:26:10PM -0500, Samuel Holland wrote: > On 4/4/21 5:08 AM, Greg Kroah-Hartman wrote: > > On Sat, Apr 03, 2021 at 07:45:04PM -0500, Samuel Holland wrote: > >> This function uses devres to clean up its allocation, but it never removes > >> the > >> file referencing that all

Re: [PATCH] debugfs: Fix use-after-free in debugfs_create_devm_seqfile()

2021-04-04 Thread Samuel Holland
On 4/4/21 5:08 AM, Greg Kroah-Hartman wrote: > On Sat, Apr 03, 2021 at 07:45:04PM -0500, Samuel Holland wrote: >> This function uses devres to clean up its allocation, but it never removes >> the >> file referencing that allocation. This causes a use-after-free and an oops if >> the file is access

Re: [PATCH] debugfs: Fix use-after-free in debugfs_create_devm_seqfile()

2021-04-04 Thread Greg Kroah-Hartman
On Sat, Apr 03, 2021 at 07:45:04PM -0500, Samuel Holland wrote: > This function uses devres to clean up its allocation, but it never removes the > file referencing that allocation. This causes a use-after-free and an oops if > the file is accessed after the owning device is removed. What in-kernel

[PATCH] debugfs: Fix use-after-free in debugfs_create_devm_seqfile()

2021-04-03 Thread Samuel Holland
This function uses devres to clean up its allocation, but it never removes the file referencing that allocation. This causes a use-after-free and an oops if the file is accessed after the owning device is removed. Fixes: 98210b7f73f1d ("debugfs: add helper function to create device related seq_fi