Make mod_verify_sig to use all trusted keys. This allows keys in
secondary_trusted_keys to be used to verify PKCS#7 signature on a
kernel module.
Signed-off-by: Ke Wu <[email protected]>
---
kernel/module_signing.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/module_signing.c b/kernel/module_signing.c
index f2075ce8e4b3..a8b923ba1a39 100644
--- a/kernel/module_signing.c
+++ b/kernel/module_signing.c
@@ -83,6 +83,6 @@ int mod_verify_sig(const void *mod, struct load_info *info)
}
return verify_pkcs7_signature(mod, modlen, mod + modlen, sig_len,
- NULL, VERIFYING_MODULE_SIGNATURE,
+ (void *)1UL, VERIFYING_MODULE_SIGNATURE,
NULL, NULL);
}
--
2.19.1.568.g152ad8e336-goog
Friendly ping.
On Mon, Oct 22, 2018 at 3:26 PM Ke Wu <[email protected]> wrote:
>
> Make mod_verify_sig to use all trusted keys. This allows keys in
> secondary_trusted_keys to be used to verify PKCS#7 signature on a
> kernel module.
>
> Signed-off-by: Ke Wu <[email protected]>
> ---
> kernel/module_signing.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/module_signing.c b/kernel/module_signing.c
> index f2075ce8e4b3..a8b923ba1a39 100644
> --- a/kernel/module_signing.c
> +++ b/kernel/module_signing.c
> @@ -83,6 +83,6 @@ int mod_verify_sig(const void *mod, struct load_info *info)
> }
>
> return verify_pkcs7_signature(mod, modlen, mod + modlen, sig_len,
> - NULL, VERIFYING_MODULE_SIGNATURE,
> + (void *)1UL, VERIFYING_MODULE_SIGNATURE,
> NULL, NULL);
> }
> --
> 2.19.1.568.g152ad8e336-goog
>
--
Ke Wu | Software Engineer | [email protected] | Google Inc.
+++ Ke Wu [22/10/18 15:26 -0700]:
>Make mod_verify_sig to use all trusted keys. This allows keys in
>secondary_trusted_keys to be used to verify PKCS#7 signature on a
>kernel module.
>
>Signed-off-by: Ke Wu <[email protected]>
Thanks for the ping, I had missed this patch.
David, could I get an ACK please?
Thanks!
Jessica
>---
> kernel/module_signing.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/kernel/module_signing.c b/kernel/module_signing.c
>index f2075ce8e4b3..a8b923ba1a39 100644
>--- a/kernel/module_signing.c
>+++ b/kernel/module_signing.c
>@@ -83,6 +83,6 @@ int mod_verify_sig(const void *mod, struct load_info *info)
> }
>
> return verify_pkcs7_signature(mod, modlen, mod + modlen, sig_len,
>- NULL, VERIFYING_MODULE_SIGNATURE,
>+ (void *)1UL, VERIFYING_MODULE_SIGNATURE,
> NULL, NULL);
> }
>--
>2.19.1.568.g152ad8e336-goog
>
Hi, I'm wondering if there is any update for the patch.
Thanks!
On Wed, Oct 31, 2018 at 2:36 AM Jessica Yu <[email protected]> wrote:
>
> +++ Ke Wu [22/10/18 15:26 -0700]:
> >Make mod_verify_sig to use all trusted keys. This allows keys in
> >secondary_trusted_keys to be used to verify PKCS#7 signature on a
> >kernel module.
> >
> >Signed-off-by: Ke Wu <[email protected]>
>
> Thanks for the ping, I had missed this patch.
>
> David, could I get an ACK please?
>
> Thanks!
>
> Jessica
>
> >---
> > kernel/module_signing.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/kernel/module_signing.c b/kernel/module_signing.c
> >index f2075ce8e4b3..a8b923ba1a39 100644
> >--- a/kernel/module_signing.c
> >+++ b/kernel/module_signing.c
> >@@ -83,6 +83,6 @@ int mod_verify_sig(const void *mod, struct load_info *info)
> > }
> >
> > return verify_pkcs7_signature(mod, modlen, mod + modlen, sig_len,
> >- NULL, VERIFYING_MODULE_SIGNATURE,
> >+ (void *)1UL, VERIFYING_MODULE_SIGNATURE,
> > NULL, NULL);
> > }
> >--
> >2.19.1.568.g152ad8e336-goog
> >
--
Ke Wu | Software Engineer | [email protected] | Google Inc.
+++ Ke Wu [22/10/18 15:26 -0700]:
>Make mod_verify_sig to use all trusted keys. This allows keys in
>secondary_trusted_keys to be used to verify PKCS#7 signature on a
>kernel module.
>
>Signed-off-by: Ke Wu <[email protected]>
>---
> kernel/module_signing.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/kernel/module_signing.c b/kernel/module_signing.c
>index f2075ce8e4b3..a8b923ba1a39 100644
>--- a/kernel/module_signing.c
>+++ b/kernel/module_signing.c
>@@ -83,6 +83,6 @@ int mod_verify_sig(const void *mod, struct load_info *info)
> }
>
> return verify_pkcs7_signature(mod, modlen, mod + modlen, sig_len,
>- NULL, VERIFYING_MODULE_SIGNATURE,
>+ (void *)1UL, VERIFYING_MODULE_SIGNATURE,
> NULL, NULL);
> }
I've just stumbled on commit 817aef260037f ("Replace magic for trusting
the secondary keyring with #define"), so we should probably use
VERIFY_USE_SECONDARY_KEYRING in place of (void *)1UL.
Thanks,
Jessica
Make mod_verify_sig to use all trusted keys. This allows keys in
secondary_trusted_keys to be used to verify PKCS#7 signature on a
kernel module.
Signed-off-by: Ke Wu <[email protected]>
---
Changelog since v1:
- Use VERIFY_USE_SECONDARY_KEYRING rather than (void *)1UL
kernel/module_signing.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/module_signing.c b/kernel/module_signing.c
index f2075ce8e4b3..6b9a926fd86b 100644
--- a/kernel/module_signing.c
+++ b/kernel/module_signing.c
@@ -83,6 +83,7 @@ int mod_verify_sig(const void *mod, struct load_info *info)
}
return verify_pkcs7_signature(mod, modlen, mod + modlen, sig_len,
- NULL, VERIFYING_MODULE_SIGNATURE,
+ VERIFY_USE_SECONDARY_KEYRING,
+ VERIFYING_MODULE_SIGNATURE,
NULL, NULL);
}
--
2.19.1.930.g4563a0d9d0-goog
Thanks for the comment! I switched to use
VERIFY_USE_SECONDARY_KEYRING, please take a look.
On Tue, Nov 6, 2018 at 3:21 PM Ke Wu <[email protected]> wrote:
>
> Make mod_verify_sig to use all trusted keys. This allows keys in
> secondary_trusted_keys to be used to verify PKCS#7 signature on a
> kernel module.
>
> Signed-off-by: Ke Wu <[email protected]>
> ---
> Changelog since v1:
> - Use VERIFY_USE_SECONDARY_KEYRING rather than (void *)1UL
>
> kernel/module_signing.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/module_signing.c b/kernel/module_signing.c
> index f2075ce8e4b3..6b9a926fd86b 100644
> --- a/kernel/module_signing.c
> +++ b/kernel/module_signing.c
> @@ -83,6 +83,7 @@ int mod_verify_sig(const void *mod, struct load_info *info)
> }
>
> return verify_pkcs7_signature(mod, modlen, mod + modlen, sig_len,
> - NULL, VERIFYING_MODULE_SIGNATURE,
> + VERIFY_USE_SECONDARY_KEYRING,
> + VERIFYING_MODULE_SIGNATURE,
> NULL, NULL);
> }
> --
> 2.19.1.930.g4563a0d9d0-goog
>
--
Ke Wu | Software Engineer | [email protected] | Google Inc.
+++ Ke Wu [06/11/18 15:23 -0800]:
>Thanks for the comment! I switched to use
>VERIFY_USE_SECONDARY_KEYRING, please take a look.
Patch has been queued on modules-next. Thanks!
Jessica
>On Tue, Nov 6, 2018 at 3:21 PM Ke Wu <[email protected]> wrote:
>>
>> Make mod_verify_sig to use all trusted keys. This allows keys in
>> secondary_trusted_keys to be used to verify PKCS#7 signature on a
>> kernel module.
>>
>> Signed-off-by: Ke Wu <[email protected]>
>> ---
>> Changelog since v1:
>> - Use VERIFY_USE_SECONDARY_KEYRING rather than (void *)1UL
>>
>> kernel/module_signing.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/kernel/module_signing.c b/kernel/module_signing.c
>> index f2075ce8e4b3..6b9a926fd86b 100644
>> --- a/kernel/module_signing.c
>> +++ b/kernel/module_signing.c
>> @@ -83,6 +83,7 @@ int mod_verify_sig(const void *mod, struct load_info *info)
>> }
>>
>> return verify_pkcs7_signature(mod, modlen, mod + modlen, sig_len,
>> - NULL, VERIFYING_MODULE_SIGNATURE,
>> + VERIFY_USE_SECONDARY_KEYRING,
>> + VERIFYING_MODULE_SIGNATURE,
>> NULL, NULL);
>> }
>> --
>> 2.19.1.930.g4563a0d9d0-goog
>>
>
>
>--
>Ke Wu | Software Engineer | [email protected] | Google Inc.