lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z9x3V_mp4VcZgJOD@kbusch-mbp.dhcp.thefacebook.com>
Date: Thu, 20 Mar 2025 14:15:19 -0600
From: Keith Busch <kbusch@...nel.org>
To: shaopeijie@...tc.cn
Cc: axboe@...nel.dk, hch@....de, sagi@...mberg.me,
	linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org,
	zhang.guanghui@...tc.cn, gechangzhong@...tc.cn
Subject: Re: [PATCH] nvme-tcp: fix selinux denied when calling sock_sendmsg

On Thu, Mar 20, 2025 at 02:35:23PM +0800, shaopeijie@...tc.cn wrote:
> From: Peijie Shao <shaopeijie@...tc.cn>
> 
> In a SELinux enabled kernel, socket_create() initializes the
> security label of the socket using the security label of the
> calling process, this typically works well.
> 
> However, in a containerized environment like Kubernetes,
> problem arises when a privileged container(domain spc_t)
> connects to an NVMe target and mounts the NVMe as persistent
> storage for unprivileged containers(domain container_t).
> 
> This is because the container_t domain cannot access
> resources labeled with spc_t, resulting in socket_sendmsg
> returning -EACCES.
> 
> The solution is to use socket_create_kern() instead of
> socket_create(), which labels the socket context to kernel_t.
> Access control will then be handled by the VFS layer rather
> than the socket itself.

Thanks, applied to nvme-6.15.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ