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  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:   Sun, 23 Aug 2020 11:55:00 +0200
From:   Pali Rohár <pali@...nel.org>
To:     Konstantin Komarov <almaz.alexandrovich@...agon-software.com>
Cc:     "viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH v2 02/10] fs/ntfs3: Add initialization of super block

On Friday 21 August 2020 16:25:03 Konstantin Komarov wrote:
> +		case Opt_nls:
> +			match_strlcpy(nls_name, &args[0], sizeof(nls_name));
> +			break;
> +
> +		/* unknown option */
> +		default:
> +			if (!silent)
> +				ntfs_error(
> +					sb,
> +					"Unrecognized mount option \"%s\" or missing value",
> +					p);
> +			//return -EINVAL;
> +		}
> +	}
> +
> +out:
> +	if (nls_name[0]) {
> +		sbi->nls = load_nls(nls_name);
> +		if (!sbi->nls) {
> +			/* critical ?*/
> +			ntfs_error(sb, "failed to load \"%s\"\n", nls_name);
> +			//return -EINVAL;

Well, I think it is a fatal error if user supplied NLS encoding cannot
be loaded. If user via mount parameter specify that wants encoding XYZ
and kernel loads different (e.g. default one) then userspace would be
confused as it would expect encoding XYZ.

> +		}
> +	}
> +
> +	if (!sbi->nls) {
> +		sbi->nls = load_nls_default();
> +		if (!sbi->nls) {
> +			/* critical */
> +			ntfs_error(sb, "failed to load default nls");
> +			return -EINVAL;
> +		}
> +	}
> +
> +	return 0;
> +}

Powered by blists - more mailing lists