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: <9349bbbe-31fe-2b0a-001d-2e22ee20c12f@redhat.com>
Date:   Tue, 8 Oct 2019 12:33:15 -0400
From:   Laura Abbott <labbott@...hat.com>
To:     Al Viro <viro@...iv.linux.org.uk>, Hugh Dickins <hughd@...gle.com>
Cc:     David Howells <dhowells@...hat.com>, Linux-MM <linux-mm@...ck.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-fsdevel@...r.kernel.org
Subject: Re: mount on tmpfs failing to parse context option

On 10/7/19 9:26 PM, Al Viro wrote:
> On Mon, Oct 07, 2019 at 05:50:31PM -0700, Hugh Dickins wrote:
> 
> [sorry for being MIA - had been sick through the last week, just digging
> myself from under piles of mail; my apologies]
> 
>> (tmpfs, very tiresomely, supports a NUMA "mpol" mount option which can
>> have commas in it e.g "mpol=bind:0,2": which makes all its comma parsing
>> awkward.  I assume that where the new mount API commits bend over to
>> accommodate that peculiarity, they end up mishandling the comma in
>> the context string above.)
> 
> 	Dumber than that, I'm afraid.  mpol is the reason for having
> ->parse_monolithic() in the first place, all right, but the problem is
> simply the lack of security_sb_eat_lsm_opts() call in it.
> 
> 	Could you check if the following fixes that one?
> 
> diff --git a/mm/shmem.c b/mm/shmem.c
> index 0f7fd4a85db6..8dcc8d04cbaf 100644
> --- a/mm/shmem.c
> +++ b/mm/shmem.c
> @@ -3482,6 +3482,12 @@ static int shmem_parse_options(struct fs_context *fc, void *data)
>   {
>   	char *options = data;
>   
> +	if (options) {
> +		int err = security_sb_eat_lsm_opts(options, &fc->security);
> +		if (err)
> +			return err;
> +	}
> +
>   	while (options != NULL) {
>   		char *this_char = options;
>   		for (;;) {
> 

Yes the reporter says that works.

Thanks,
Laura

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ