Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] binfmt_misc: only let punctuation delimit a register string
@ 2026-08-26 15:55 Christian Brauner
  2026-08-26 15:55 ` [PATCH 1/3] " Christian Brauner
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Christian Brauner @ 2026-08-26 15:55 UTC (permalink / raw)
  To: linux-fsdevel
  Cc: Alexander Viro, Jan Kara, Kees Cook, linux-mm, linux-kernel, bpf,
	linux-doc, Farid Zakaria, Christian Brauner (Amutable)

Currently we accept arbitrary delimiters which really makes no sense and
from looking around it's an unused feature. Everytime we add a flag the
number of possible delimiter shrinks and it makes extensions much more
hazardous than they need to be. Stop it and only accept punctional as
delimiters.

This extends commit 8e85d50ba111 ("binfmt_misc: reject a flag character
as the field delimiter").

Letters, digits, whitespace, control characters, bytes above 0x7f and
the backslash now get -EINVAL. Everything deployed uses ':' anyway.

Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
---
Christian Brauner (3):
      binfmt_misc: only let punctuation delimit a register string
      selftests/exec: test delimiter restrictions
      binfmt_misc: document the field delimiter

 Documentation/admin-guide/binfmt-misc.rst        |   3 +
 fs/binfmt_misc.c                                 |  12 ++-
 tools/testing/selftests/exec/Makefile            |   4 +
 tools/testing/selftests/exec/binfmt_misc_delim.c | 127 +++++++++++++++++++++++
 4 files changed, 143 insertions(+), 3 deletions(-)
---
base-commit: 66498c75b4f8017f62d720d9b59675bdf3abce91
change-id: 20260810-work-binfmt_misc-delim-83f62cbcfe23



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-08-26 15:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-26 15:55 [PATCH 0/3] binfmt_misc: only let punctuation delimit a register string Christian Brauner
2026-08-26 15:55 ` [PATCH 1/3] " Christian Brauner
2026-08-26 15:55 ` [PATCH 2/3] selftests/exec: test delimiter restrictions Christian Brauner
2026-08-26 15:55 ` [PATCH 3/3] binfmt_misc: document the field delimiter Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox