Re: [PATCH] module: harden ELF info handling

2021-01-06 Thread Frank van der Linden
On Tue, Jan 05, 2021 at 02:39:28PM +0100, Jessica Yu wrote: > Hi Frank, > > Sorry for the delay. I've just gotten back from vacation :-) No problem - I figured you were :-) Comments inline - > > +++ Frank van der Linden [21/12/20 23:49 +]: > > 5fdc7db644 ("module: setup load info before mod

Re: [PATCH] module: harden ELF info handling

2021-01-05 Thread Jessica Yu
Hi Frank, Sorry for the delay. I've just gotten back from vacation :-) +++ Frank van der Linden [21/12/20 23:49 +]: 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 si

Re: [PATCH] module: harden ELF info handling

2020-12-21 Thread Frank van der Linden
I tested this patch by writing a little ELF corruption program that messes up ELF sections, especially those that are accessed early, in various ways. With the patch, I could no longer cause any problems with corrupted modules. In the patch I sent in, I moved the signature back up, so that it's do

[PATCH] module: harden ELF info handling

2020-12-21 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 memory