All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <kees@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: "Christian Brauner" <brauner@kernel.org>,
	syzbot+a9391462075ffb9f77c6@syzkaller.appspotmail.com,
	"Sumit Semwal" <sumit.semwal@linaro.org>,
	"Christian König" <christian.koenig@amd.com>,
	linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linaro-mm-sig@lists.linaro.org, linux-kernel@vger.kernel.org,
	linux-hardening@vger.kernel.org
Subject: Re: [PATCH] dma-buf: use SB_I_NOEXEC and SB_I_NODEV
Date: Fri, 10 Oct 2025 15:57:26 -0700	[thread overview]
Message-ID: <202510101556.5C71F86@keescook> (raw)
In-Reply-To: <aOYBpY7jPx622xcz@infradead.org>

On Tue, Oct 07, 2025 at 11:16:05PM -0700, Christoph Hellwig wrote:
> On Tue, Oct 07, 2025 at 11:10:32PM -0700, Kees Cook wrote:
> > The dma-buf pseudo-filesystem should never have executable mappings nor
> > device nodes. Set SB_I_NOEXEC and SB_I_NODEV on the superblock to enforce
> > this at the filesystem level, similar to secretmem, commit 98f99394a104
> > ("secretmem: use SB_I_NOEXEC").
> > 
> > Fix the syzbot-reported warning from the exec code to enforce this
> > requirement:
> 
> Can you please just enforce this in init_pseudo?  If a file system
> really wants to support devices or executable it can clear them,
> but a quick grep suggests that none of them should.

I that that's a fine idea, but I defer to Christian -- I think the WARN
was put in place to avoid doing that...

-- 
Kees Cook

      reply	other threads:[~2025-10-10 22:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-08  6:10 [PATCH] dma-buf: use SB_I_NOEXEC and SB_I_NODEV Kees Cook
2025-10-08  6:16 ` Christoph Hellwig
2025-10-10 22:57   ` Kees Cook [this message]

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=202510101556.5C71F86@keescook \
    --to=kees@kernel.org \
    --cc=brauner@kernel.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hch@infradead.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=sumit.semwal@linaro.org \
    --cc=syzbot+a9391462075ffb9f77c6@syzkaller.appspotmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.