Re: [PATCH v3] audit,module: restore audit logging in load failure case
From: Paul Moore
Date: Mon Jun 16 2025 - 17:00:16 EST
On Jun 13, 2025 Richard Guy Briggs <rgb@xxxxxxxxxx> wrote:
>
> The move of the module sanity check to earlier skipped the audit logging
> call in the case of failure and to a place where the previously used
> context is unavailable.
>
> Add an audit logging call for the module loading failure case and get
> the module name when possible.
>
> Link: https://issues.redhat.com/browse/RHEL-52839
> Fixes: 02da2cbab452 ("module: move check_modinfo() early to early_mod_check()")
> Signed-off-by: Richard Guy Briggs <rgb@xxxxxxxxxx>
> Reviewed-by: Petr Pavlu <petr.pavlu@xxxxxxxx>
> ---
> Changelog:
> v2
> - use info->name for both audit_log_kern_module() calls and add const
> v3
> - use "?" rather than "(unavailable)" for consistency with other records
> ---
> include/linux/audit.h | 9 ++++-----
> kernel/audit.h | 2 +-
> kernel/auditsc.c | 2 +-
> kernel/module/main.c | 6 ++++--
> 4 files changed, 10 insertions(+), 9 deletions(-)
Merged into audit/dev, thanks!
--
paul-moore.com