[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YGmQAWBN4+uQCIUa@kroah.com>
Date: Sun, 4 Apr 2021 12:08:01 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Samuel Holland <samuel@...lland.org>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
Arend van Spriel <arend@...adcom.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] debugfs: Fix use-after-free in
debugfs_create_devm_seqfile()
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 user of this is having this problem?
The driver should clean up the debugfs file, it is not the debugfs
core's job to auto-remove the file.
The resource is what is being cleaned up by the devm usage in debugfs,
that's all, not the file.
Please fix up the driver that is creating the file but then not removing
it.
thanks,
greg k-h
Powered by blists - more mailing lists