public inbox for linux-sgx@vger.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Jarkko Sakkinen <jarkko@kernel.org>
Cc: linux-sgx@vger.kernel.org, Shuah Khan <shuah@kernel.org>,
	linux-kselftest@vger.kernel.org, akpm@linux-foundation.org,
	andriy.shevchenko@linux.intel.com, asapek@google.com,
	cedric.xing@intel.com, chenalexchen@google.com,
	conradparker@google.com, cyhanish@google.com,
	dave.hansen@intel.com, haitao.huang@intel.com,
	kai.huang@intel.com, kai.svahn@intel.com, kmoy@google.com,
	ludloff@google.com, luto@kernel.org, nhorman@redhat.com,
	npmccallum@redhat.com, puiterwijk@redhat.com,
	rientjes@google.com, sean.j.christopherson@intel.com,
	tglx@linutronix.de, yaozhangx@google.com, mikko.ylinen@intel.com
Subject: Re: [PATCH] selftests/x86: Fix malformed src_offset initialization
Date: Thu, 19 Nov 2020 19:04:59 +0100	[thread overview]
Message-ID: <20201119180459.GF3769@zn.tnic> (raw)
In-Reply-To: <20201119164144.GA77509@kernel.org>

On Thu, Nov 19, 2020 at 06:41:44PM +0200, Jarkko Sakkinen wrote:
> As Topi (the Debian developer who did this change) stated in the thread,
> the threat scenario is that someone could create executable files to
> /dev if it isn't noexec. It's not about the permissions of device files
> per se.

Aha, makes sense.

> The problem with anonymous inode is that LSM's cannot label it easily
> like you can a non-anonymous inode.
> 
> There's a patch set for secure anonymous inodes but it hasn't landed yet
> and I think it would make the whole security model somewhat more
> complicated [1].

More complicated is never good.

> 1. You can always create a separate tmpfs and create enclave nodes
>    and even bind mount them (proposed by Andy) to /dev.
> 2. It would be possible (given how Topi described the threat scenario)
>    implement "noexec_dev" mount option that would allow 'x' for dev's
>    but not for anything else (proposed by me).
> 
> To summarize, I would not change the SGX code for this but apply either
> (1) and (2) when deploying SGX.

Both sound ok to me, especially 1 since you can do that now, without any
changes needed.

Anything else means adding more code which for distros and people using
older kernels means, more backporting and more verif.

But WTH do I know...

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

  reply	other threads:[~2020-11-19 18:05 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17 22:36 [PATCH] selftests/x86: Fix malformed src_offset initialization Jarkko Sakkinen
2020-11-18 11:11 ` Borislav Petkov
2020-11-18 11:18   ` Jethro Beekman
2020-11-18 11:44     ` Borislav Petkov
2020-11-18 11:47       ` Borislav Petkov
2020-11-18 11:49         ` Borislav Petkov
2020-11-18 15:24         ` Jarkko Sakkinen
2020-11-18 15:30           ` Jarkko Sakkinen
2020-11-18 12:00       ` Jethro Beekman
2020-11-18 12:15         ` Borislav Petkov
2020-11-18 15:27           ` Jarkko Sakkinen
2020-11-18 17:09         ` Jarkko Sakkinen
2020-11-18 15:07   ` Jarkko Sakkinen
2020-11-18 17:19 ` Borislav Petkov
2020-11-18 17:58   ` Jarkko Sakkinen
2020-11-18 18:04     ` Borislav Petkov
2020-11-18 21:37       ` Jarkko Sakkinen
2020-11-18 21:54         ` Borislav Petkov
2020-11-19  1:16           ` Andy Lutomirski
2020-11-19 16:44             ` Jarkko Sakkinen
2020-11-19 16:41           ` Jarkko Sakkinen
2020-11-19 18:04             ` Borislav Petkov [this message]
2020-11-19  1:05         ` Dr. Greg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201119180459.GF3769@zn.tnic \
    --to=bp@alien8.de \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=asapek@google.com \
    --cc=cedric.xing@intel.com \
    --cc=chenalexchen@google.com \
    --cc=conradparker@google.com \
    --cc=cyhanish@google.com \
    --cc=dave.hansen@intel.com \
    --cc=haitao.huang@intel.com \
    --cc=jarkko@kernel.org \
    --cc=kai.huang@intel.com \
    --cc=kai.svahn@intel.com \
    --cc=kmoy@google.com \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-sgx@vger.kernel.org \
    --cc=ludloff@google.com \
    --cc=luto@kernel.org \
    --cc=mikko.ylinen@intel.com \
    --cc=nhorman@redhat.com \
    --cc=npmccallum@redhat.com \
    --cc=puiterwijk@redhat.com \
    --cc=rientjes@google.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=shuah@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=yaozhangx@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox