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]
Message-Id: <20201222210345.2275038-1-ndesaulniers@google.com>
Date:   Tue, 22 Dec 2020 13:03:45 -0800
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     Alexander Viro <viro@...iv.linux.org.uk>
Cc:     Nick Desaulniers <ndesaulniers@...gle.com>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
        Guenter Roeck <linux@...ck-us.net>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] fs: binfmt_em86: check return code of remove_arg_zero

remove_arg_zero is declared as __must_check. Looks like it can return
-EFAULT on failure.

Cc: Masahiro Yamada <masahiroy@...nel.org>
Cc: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Reported-by: Guenter Roeck <linux@...ck-us.net>
Signed-off-by: Nick Desaulniers <ndesaulniers@...gle.com>
---
 fs/binfmt_em86.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/binfmt_em86.c b/fs/binfmt_em86.c
index 06b9b9fddf70..6e98fcfca66e 100644
--- a/fs/binfmt_em86.c
+++ b/fs/binfmt_em86.c
@@ -63,7 +63,8 @@ static int load_em86(struct linux_binprm *bprm)
 	 * This is done in reverse order, because of how the
 	 * user environment and arguments are stored.
 	 */
-	remove_arg_zero(bprm);
+	retval = remove_arg_zero(bprm);
+	if (retval < 0) return retval;
 	retval = copy_string_kernel(bprm->filename, bprm);
 	if (retval < 0) return retval; 
 	bprm->argc++;
-- 
2.29.2.729.g45daf8777d-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ