BPF List
 help / color / mirror / Atom feed
From: BTD Master <btdmaster@disroot.org>
To: bpf@vger.kernel.org
Subject: kernel: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set
Date: Tue, 18 Jun 2024 18:43:18 +0100	[thread overview]
Message-ID: <20240618184318.01aaaf4f@disroot.org> (raw)

Hi,

I would like to report the call to memfd_create in `src/libbpf.c` does
not specify MFD_NOEXEC_SEAL on newer kernels that allow
this feature, which is used to prevent code execution on the memory
area. It only specifies MFD_CLOEXEC.

This is reflected in the kernel logs:
[    4.853311] systemd[1]: memfd_create() called without MFD_EXEC or
MFD_NOEXEC_SEAL set

There is a similar patch in wayland for checking and versioning this
flag: https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/343/

Thanks!
btdmaster

                 reply	other threads:[~2024-06-18 17:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20240618184318.01aaaf4f@disroot.org \
    --to=btdmaster@disroot.org \
    --cc=bpf@vger.kernel.org \
    /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