Re: [PATCH] security: fix the key_permission LSM hook function type

2020-06-22 Thread James Morris
On Mon, 15 Jun 2020, Sami Tolvanen wrote: > Commit 8c0637e950d6 ("keys: Make the KEY_NEED_* perms an enum rather than > a mask") changed the type of the key_permission callback functions, but > didn't change the type of the hook, which trips indirect call checking with > Control-Flow Integrity (CF

Re: [PATCH] security: fix the key_permission LSM hook function type

2020-06-20 Thread Kees Cook
On Mon, Jun 15, 2020 at 11:12:32AM -0700, Sami Tolvanen wrote: > Commit 8c0637e950d6 ("keys: Make the KEY_NEED_* perms an enum rather than > a mask") changed the type of the key_permission callback functions, but > didn't change the type of the hook, which trips indirect call checking with > Contro

Re: [PATCH] security: fix the key_permission LSM hook function type

2020-06-15 Thread Kees Cook
On Mon, Jun 15, 2020 at 11:23:44AM -0700, Nick Desaulniers wrote: > On Mon, Jun 15, 2020 at 11:21 AM Kees Cook wrote: > > > > On Mon, Jun 15, 2020 at 11:12:32AM -0700, Sami Tolvanen wrote: > > > Commit 8c0637e950d6 ("keys: Make the KEY_NEED_* perms an enum rather than > > > a mask") changed the ty

Re: [PATCH] security: fix the key_permission LSM hook function type

2020-06-15 Thread Nick Desaulniers
On Mon, Jun 15, 2020 at 11:21 AM Kees Cook wrote: > > On Mon, Jun 15, 2020 at 11:12:32AM -0700, Sami Tolvanen wrote: > > Commit 8c0637e950d6 ("keys: Make the KEY_NEED_* perms an enum rather than > > a mask") changed the type of the key_permission callback functions, but > > didn't change the type

Re: [PATCH] security: fix the key_permission LSM hook function type

2020-06-15 Thread Kees Cook
On Mon, Jun 15, 2020 at 11:12:32AM -0700, Sami Tolvanen wrote: > Commit 8c0637e950d6 ("keys: Make the KEY_NEED_* perms an enum rather than > a mask") changed the type of the key_permission callback functions, but > didn't change the type of the hook, which trips indirect call checking with > Contro

[PATCH] security: fix the key_permission LSM hook function type

2020-06-15 Thread Sami Tolvanen
Commit 8c0637e950d6 ("keys: Make the KEY_NEED_* perms an enum rather than a mask") changed the type of the key_permission callback functions, but didn't change the type of the hook, which trips indirect call checking with Control-Flow Integrity (CFI). This change fixes the issue by changing the hoo