lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20171023162436.GB2454@glitch>
Date:   Mon, 23 Oct 2017 14:24:36 -0200
From:   "Bruno E. O. Meneguele" <brdeoliv@...hat.com>
To:     Mimi Zohar <zohar@...ux.vnet.ibm.com>
Cc:     linux-kernel@...r.kernel.org,
        linux-security-module@...r.kernel.org,
        linux-integrity@...r.kernel.org, serge@...lyn.com,
        james.l.morris@...cle.com, dmitry.kasatkin@...il.com,
        rusty@...tcorp.com.au, jeyu@...nel.org
Subject: Re: [PATCH 1/2] module: export module signature enforcement status

On 23-10, Mimi Zohar wrote:
> On Fri, 2017-10-20 at 17:19 -0200, Bruno E. O. Meneguele wrote:
> > A static variable sig_enforce is used as status var to indicate the real
> > value of CONFIG_MODULE_SIG_FORCE, once this one is set the var will hold
> > true, but if the CONFIG is not set the status var will hold whatever
> > value is present in the module.sig_enforce kernel cmdline param: true
> > when =1 and false when =0 or not present.
> > 
> > Considering this cmdline param take place over the CONFIG value when
> > it's not set, other places in the kernel could missbehave since they
> 
> ^misbehave
> 

right.

> > would have only the CONFIG_MODULE_SIG_FORCE value to rely on. Exporting
> > this status var allows the kernel to rely in the effective value of
> > module signature enforcement, being it from CONFIG value or cmdline
> > param.
> 
> Thanks!  There's a minor checkpatch warning below.
> 
> > Signed-off-by: Bruno E. O. Meneguele <brdeoliv@...hat.com>
> > ---
> >  include/linux/module.h | 2 ++
> >  kernel/module.c        | 8 ++++++++
> >  2 files changed, 10 insertions(+)
> > 
> > diff --git a/include/linux/module.h b/include/linux/module.h
> > index fe5aa3736707..ddfe17e3a85c 100644
> > --- a/include/linux/module.h
> > +++ b/include/linux/module.h
> > @@ -806,4 +806,6 @@ static inline bool module_sig_ok(struct module *module)
> >  }
> >  #endif	/* CONFIG_MODULE_SIG */
> > 
> > +bool is_module_sig_enforced(void);
> > +
> >  #endif /* _LINUX_MODULE_H */
> > diff --git a/kernel/module.c b/kernel/module.c
> > index de66ec825992..b93c7ff44066 100644
> > --- a/kernel/module.c
> > +++ b/kernel/module.c
> > @@ -278,6 +278,14 @@ static bool sig_enforce = IS_ENABLED(CONFIG_MODULE_SIG_FORCE);
> >  module_param(sig_enforce, bool_enable_only, 0644);
> >  #endif /* !CONFIG_MODULE_SIG_FORCE */
> > 
> > +/* Export sig_enforce kernel cmdline parameter to allow other subsystems rely
> > + * on that instead of directly to CONFIG_MODULE_SIG_FORCE config. */
> 
> Checkpatch complains.  Please use the normal format:
> /*
>  *
>  */
> 

Oh, sure, sorry for that! I'll resend a v2 of the patchset in a minute.

Thanks.

> > +bool is_module_sig_enforced(void)
> > +{
> > +	return sig_enforce;
> > +}
> > +EXPORT_SYMBOL(is_module_sig_enforced);
> > +
> >  /* Block module loading/unloading? */
> >  int modules_disabled = 0;
> >  core_param(nomodule, modules_disabled, bint, 0);
> 

-- 
bmeneg 
PGP Key: http://bmeneg.com/pubkey.txt

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ