[PATCH 0/3] binfmt_misc: only let punctuation delimit a register string
From: Christian Brauner
Date: Wed Aug 26 2026 - 11:56:41 EST
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@xxxxxxxxxx>
---
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