Go to file
Stefan Berger 458458c130 crypto: ecdsa - Fix module auto-load on add-key
commit 48e4fd6d54 upstream.

Add module alias with the algorithm cra_name similar to what we have for
RSA-related and other algorithms.

The kernel attempts to modprobe asymmetric algorithms using the names
"crypto-$cra_name" and "crypto-$cra_name-all." However, since these
aliases are currently missing, the modules are not loaded. For instance,
when using the `add_key` function, the hash algorithm is typically
loaded automatically, but the asymmetric algorithm is not.

Steps to test:

1. Create certificate

  openssl req -x509 -sha256 -newkey ec \
  -pkeyopt "ec_paramgen_curve:secp384r1" -keyout key.pem -days 365 \
  -subj '/CN=test' -nodes -outform der -out nist-p384.der

2. Optionally, trace module requests with: trace-cmd stream -e module &

3. Trigger add_key call for the cert:

   # keyctl padd asymmetric "" @u < nist-p384.der
   641069229
   # lsmod | head -2
   Module                  Size  Used by
   ecdsa_generic          16384  0

Fixes: c12d448ba9 ("crypto: ecdsa - Register NIST P384 and extend test suite")
Cc: stable@vger.kernel.org
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Vitaly Chikunov <vt@altlinux.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-06-16 13:41:37 +02:00
arch KVM: arm64: AArch32: Fix spurious trapping of conditional instructions 2024-06-16 13:41:37 +02:00
block block: support to account io_ticks precisely 2024-06-12 11:03:07 +02:00
certs certs: Fix build error when PKCS#11 URI contains semicolon 2023-02-09 11:28:11 +01:00
crypto crypto: ecdsa - Fix module auto-load on add-key 2024-06-16 13:41:37 +02:00
Documentation net: ena: Add dynamic recycling mechanism for rx buffers 2024-06-12 11:03:58 +02:00
drivers drm/amd: Fix shutdown (again) on some SMU v13.0.4/11 platforms 2024-06-16 13:41:37 +02:00
fs 9p: add missing locking around taking dentry fid list 2024-06-16 13:41:37 +02:00
include mmc: core: Add mmc_gpiod_set_cd_config() function 2024-06-16 13:41:35 +02:00
init rust: make mutually exclusive with CFI_CLANG 2024-05-02 16:29:27 +02:00
io_uring io_uring: use the right type for work_llist empty check 2024-06-12 11:03:05 +02:00
ipc ipc: fix memory leak in init_mqueue_fs() 2022-12-31 13:32:01 +01:00
kernel bpf: Allow delete from sockmap/sockhash only if update is allowed 2024-06-12 11:03:56 +02:00
lib maple_tree: fix mas_empty_area_rev() null pointer dereference 2024-06-16 13:41:31 +02:00
LICENSES
mm mm/hugetlb: fix DEBUG_LOCKS_WARN_ON(1) when dissolve_free_hugetlb_folio() 2024-05-17 11:56:24 +02:00
net mptcp: fix full TCP keep-alive support 2024-06-16 13:41:32 +02:00
rust rust: macros: fix soundness issue in module! macro 2024-05-17 11:56:17 +02:00
samples work around gcc bugs with 'asm goto' with outputs 2024-02-23 09:12:28 +01:00
scripts scripts/gdb: fix SB_* constants parsing 2024-06-16 13:41:32 +02:00
security KEYS: trusted: Do not use WARN when encode fails 2024-05-25 16:21:35 +02:00
sound ALSA: timer: Set lower bound of start tick time 2024-06-12 11:03:59 +02:00
tools bpf: Fix potential integer overflow in resolve_btfids 2024-06-12 11:03:55 +02:00
usr usr/gen_init_cpio.c: remove unnecessary -1 values from int file 2022-10-03 14:21:44 -07:00
virt KVM: Always flush async #PF workqueue when vCPU is being destroyed 2024-04-03 15:19:25 +02:00
.clang-format inet: ping: use hlist_nulls rcu iterator during lookup 2022-12-01 12:42:46 +01:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore Kbuild: add Rust support 2022-09-28 09:02:20 +02:00
.mailmap 9 hotfixes. 6 for MM, 3 for other areas. Four of these patches address 2022-12-10 17:10:52 -08:00
.rustfmt.toml
COPYING
CREDITS MAINTAINERS: Remove Michal Marek from Kbuild maintainers 2022-11-16 14:53:00 +09:00
Kbuild Kbuild updates for v6.1 2022-10-10 12:00:45 -07:00
Kconfig
MAINTAINERS MAINTAINERS: add leah to 6.1 MAINTAINERS file 2024-05-17 11:56:16 +02:00
Makefile Linux 6.1.93 2024-06-12 11:04:00 +02:00
README

Linux kernel

There are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML and PDF. Please read Documentation/admin-guide/README.rst first.

In order to build the documentation, use make htmldocs or make pdfdocs. The formatted documentation can also be read online at:

https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory, several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the requirements for building and running the kernel, and information about the problems which may result by upgrading your kernel.