Re: [PATCH v2] module: harden ELF info handling

2021-01-14 Thread Frank van der Linden
On Wed, Jan 13, 2021 at 03:48:42PM +0100, Jessica Yu wrote: > > [...] > > + err = validate_section_offset(info, shdr); > > + if (err < 0) { > > + pr_err("Invalid ELF section in module > > (section %u type %u)\n", > > +

Re: [PATCH v2] module: harden ELF info handling

2021-01-13 Thread Jessica Yu
+++ Frank van der Linden [07/01/21 19:30 +]: 5fdc7db644 ("module: setup load info before module_sig_check()") moved the ELF setup, so that it was done before the signature check. This made the module name available to signature error messages. However, the checks for ELF correctness in

[PATCH v2] module: harden ELF info handling

2021-01-07 Thread Frank van der Linden
5fdc7db644 ("module: setup load info before module_sig_check()") moved the ELF setup, so that it was done before the signature check. This made the module name available to signature error messages. However, the checks for ELF correctness in setup_load_info are not sufficient to prevent bad