[PATCH v1 2/2] selftests/landlock: Check full ioctl commands in audit records
Paul Moore
paul at paul-moore.com
Mon Sep 14 20:41:52 UTC 2026
On Sep 10, 2026 =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= <mic at digikod.net> wrote:
>
> The ioctl audit test uses FIONREAD, whose command value fits in 16 bits.
> It therefore cannot detect truncation of encoded direction and size
> bits.
>
> Use an architecture-independent unknown command with set upper bits and
> require its complete value in the audit record. Landlock rejects the
> command before the device handles it, and the existing ioctl enforcement
> test already exercises the same request. The new expectation fails with
> ioctlcmd=0xfeee on an unfixed kernel and passes with ioctlcmd=0xc00ffeee
> after the shared audit field is widened.
>
> Signed-off-by: Mickaël Salaün <mic at digikod.net>
> Reviewed-by: Günther Noack <gnoack at google.com>
> ---
> tools/testing/selftests/landlock/fs_test.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
Merged into lsm/dev, thanks.
--
paul-moore.com
More information about the Linux-security-module-archive
mailing list