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] [thread-next>] [day] [month] [year] [list]
Message-Id: <D3GOR6ZR0MPL.2O29DCFWQ77RA@kernel.org>
Date: Thu, 15 Aug 2024 21:10:22 +0300
From: "Jarkko Sakkinen" <jarkko@...nel.org>
To: "Jann Horn" <jannh@...gle.com>, "Paul Moore" <paul@...l-moore.com>,
 "James Morris" <jmorris@...ei.org>, "Serge E. Hallyn" <serge@...lyn.com>,
 "John Johansen" <john.johansen@...onical.com>, "David Howells"
 <dhowells@...hat.com>, Mickaël Salaün
 <mic@...ikod.net>, Günther Noack <gnoack@...gle.com>,
 "Stephen Smalley" <stephen.smalley.work@...il.com>, "Ondrej Mosnacek"
 <omosnace@...hat.com>, "Casey Schaufler" <casey@...aufler-ca.com>
Cc: <linux-kernel@...r.kernel.org>, <linux-security-module@...r.kernel.org>,
 <apparmor@...ts.ubuntu.com>, <keyrings@...r.kernel.org>,
 <selinux@...r.kernel.org>
Subject: Re: [PATCH v2 1/2] KEYS: use synchronous task work for changing
 parent credentials

On Mon Aug 5, 2024 at 2:54 PM EEST, Jann Horn wrote:
> keyctl_session_to_parent() involves posting task work to the parent task,
> with work function key_change_session_keyring.
> Because the task work in the parent runs asynchronously, no errors can be
> returned back to the caller of keyctl_session_to_parent(), and therefore
> the work function key_change_session_keyring() can't be allowed to fail due
> to things like memory allocation failure or permission checks - all
> allocations and checks have to happen in the child.
>
> This is annoying for two reasons:
>
>  - It is the only reason why cred_alloc_blank() and
>    security_transfer_creds() are necessary.
>  - It means we can't do synchronous permission checks.

I agree with this premise. Also I think the code change is reasonable.

I'd like to see a comment from David tho.

BR, Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ