public inbox for [email protected]
 help / color / mirror / Atom feed
* IORING_OP_FIXED_FD_INSTALL and audit/LSM interactions
@ 2024-01-19 16:33 Paul Moore
  2024-01-19 17:02 ` Jens Axboe
  2024-01-22 15:15 ` Christian Brauner
  0 siblings, 2 replies; 7+ messages in thread
From: Paul Moore @ 2024-01-19 16:33 UTC (permalink / raw)
  To: Jens Axboe, Christian Brauner
  Cc: io-uring, linux-security-module, audit, selinux

Hello all,

I just noticed the recent addition of IORING_OP_FIXED_FD_INSTALL and I
see that it is currently written to skip the io_uring auditing.
Assuming I'm understanding the patch correctly, and I'll admit that
I've only looked at it for a short time today, my gut feeling is that
we want to audit the FIXED_FD_INSTALL opcode as it could make a
previously io_uring-only fd generally accessible to userspace.

I'm also trying to determine how worried we should be about
io_install_fixed_fd() potentially happening with the current task's
credentials overridden by the io_uring's personality.  Given that this
io_uring operation inserts a fd into the current process, I believe
that we should be checking to see if the current task's credentials,
and not the io_uring's credentials/personality, are allowed to receive
the fd in receive_fd()/security_file_receive().  I don't see an
obvious way to filter/block credential overrides on a per-opcode
basis, but if we don't want to add a mask for io_kiocb::flags in
io_issue_defs (or something similar), perhaps we can forcibly mask out
REQ_F_CREDS in io_install_fixed_fd_prep()?  I'm very interested to
hear what others think about this.

Of course if I'm reading the commit or misunderstanding the
IORING_OP_FIXED_FD_INSTALL operation, corrections are welcome :)

-- 
paul-moore.com

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

end of thread, other threads:[~2024-01-22 15:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-19 16:33 IORING_OP_FIXED_FD_INSTALL and audit/LSM interactions Paul Moore
2024-01-19 17:02 ` Jens Axboe
2024-01-19 17:20   ` Paul Moore
2024-01-19 17:41     ` Jens Axboe
2024-01-19 17:54       ` Paul Moore
2024-01-19 18:00         ` Jens Axboe
2024-01-22 15:15 ` Christian Brauner

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