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: <20180708210154.10423-18-ebiggers3@gmail.com>
Date:   Sun,  8 Jul 2018 14:01:53 -0700
From:   Eric Biggers <ebiggers3@...il.com>
To:     David Howells <dhowells@...hat.com>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        linux-fsdevel@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, Eric Biggers <ebiggers@...gle.com>
Subject: [PATCH 17/18] fs_context: de-obfuscate command validation

From: Eric Biggers <ebiggers@...gle.com>

Signed-off-by: Eric Biggers <ebiggers@...gle.com>
---
 fs/fsopen.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/fs/fsopen.c b/fs/fsopen.c
index dd38f6b65aace..34d7292bb398e 100644
--- a/fs/fsopen.c
+++ b/fs/fsopen.c
@@ -50,10 +50,10 @@ static ssize_t fscontext_write(struct file *file,
 	case 'x':
 		break;
 	default:
-		goto err_bad_cmd;
+		return -EINVAL;
 	}
 	if (opt[1] != ' ')
-		goto err_bad_cmd;
+		return -EINVAL;
 
 	data = memdup_user_nul(_buf + 2, len - 2);
 	if (IS_ERR(data))
@@ -136,8 +136,7 @@ static ssize_t fscontext_write(struct file *file,
 err_free:
 	kfree(data);
 	return ret;
-err_bad_cmd:
-	return -EINVAL;
+
 wrong_phase:
 	ret = -EBUSY;
 	goto err_unlock;
-- 
2.18.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ