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: <e8da3414f4ba9311dbde3945cb19297feb79df82.camel@intel.com>
Date: Sat, 10 Feb 2024 00:56:35 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "dietmar.eggemann@....com" <dietmar.eggemann@....com>,
	"broonie@...nel.org" <broonie@...nel.org>, "Szabolcs.Nagy@....com"
	<Szabolcs.Nagy@....com>, "brauner@...nel.org" <brauner@...nel.org>,
	"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
	"debug@...osinc.com" <debug@...osinc.com>, "mgorman@...e.de"
	<mgorman@...e.de>, "vincent.guittot@...aro.org" <vincent.guittot@...aro.org>,
	"fweimer@...hat.com" <fweimer@...hat.com>, "mingo@...hat.com"
	<mingo@...hat.com>, "rostedt@...dmis.org" <rostedt@...dmis.org>,
	"hjl.tools@...il.com" <hjl.tools@...il.com>, "tglx@...utronix.de"
	<tglx@...utronix.de>, "vschneid@...hat.com" <vschneid@...hat.com>,
	"shuah@...nel.org" <shuah@...nel.org>, "bristot@...hat.com"
	<bristot@...hat.com>, "hpa@...or.com" <hpa@...or.com>, "peterz@...radead.org"
	<peterz@...radead.org>, "bp@...en8.de" <bp@...en8.de>, "bsegall@...gle.com"
	<bsegall@...gle.com>, "x86@...nel.org" <x86@...nel.org>,
	"juri.lelli@...hat.com" <juri.lelli@...hat.com>
CC: "keescook@...omium.org" <keescook@...omium.org>, "jannh@...gle.com"
	<jannh@...gle.com>, "linux-kselftest@...r.kernel.org"
	<linux-kselftest@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "catalin.marinas@....com"
	<catalin.marinas@....com>, "linux-api@...r.kernel.org"
	<linux-api@...r.kernel.org>, "will@...nel.org" <will@...nel.org>
Subject: Re: [PATCH RFT v5 4/7] fork: Add shadow stack support to clone3()

On Sat, 2024-02-03 at 00:05 +0000, Mark Brown wrote:
> +       if (args->shadow_stack) {
> +               addr = args->shadow_stack;
> +               size = args->shadow_stack_size;
>  
> -       size = adjust_shstk_size(stack_size);
> -       addr = alloc_shstk(0, size, 0, false);
> -       if (IS_ERR_VALUE(addr))
> -               return addr;
> +               /* There should be a valid token at the top of the
> stack. */
> +               if (!shstk_consume_token(tsk, addr + size -
> sizeof(u64)))
> +                       return (unsigned long)ERR_PTR(-EINVAL);

I think for this case, it needs:
	shstk->base = 0;
	shstk->size = 0;

To prevent trying to free the parents shadow stack when the child
exits.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ