lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 28 Feb 2019 16:25:01 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Sasha Levin <sashal@...nel.org>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH AUTOSEL 4.20 34/81] debugfs: return error values, not NULL

On Thu, Feb 28, 2019 at 10:07:26AM -0500, Sasha Levin wrote:
> From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> 
> [ Upstream commit ff9fb72bc07705c00795ca48631f7fffe24d2c6b ]
> 
> When an error happens, debugfs should return an error pointer value, not
> NULL.  This will prevent the totally theoretical error where a debugfs
> call fails due to lack of memory, returning NULL, and that dentry value
> is then passed to another debugfs call, which would end up succeeding,
> creating a file at the root of the debugfs tree, but would then be
> impossible to remove (because you can not remove the directory NULL).
> 
> So, to make everyone happy, always return errors, this makes the users
> of debugfs much simpler (they do not have to ever check the return
> value), and everyone can rest easy.
> 
> Reported-by: Gary R Hook <ghook@....com>
> Reported-by: Heiko Carstens <heiko.carstens@...ibm.com>
> Reported-by: Masami Hiramatsu <mhiramat@...nel.org>
> Reported-by: Michal Hocko <mhocko@...nel.org>
> Reported-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> Reported-by: Ulf Hansson <ulf.hansson@...aro.org>
> Reviewed-by: Masami Hiramatsu <mhiramat@...nel.org>
> Reviewed-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Signed-off-by: Sasha Levin <sashal@...nel.org>
> ---
>  fs/debugfs/inode.c | 39 ++++++++++++++++++++++-----------------
>  1 file changed, 22 insertions(+), 17 deletions(-)

As much as I would love to backport this patch, no, please do not, I did
not mark it for stable on purpose.  It can cause regressions with code
that is not expecting this behavior (I have a fix that needs to go into
5.0 for this very reason.)

Please drop it from all queues.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ