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: <20190605161141.GA4538@zhanggen-UX430UQ>
Date:   Thu, 6 Jun 2019 00:11:41 +0800
From:   Gen Zhang <blackgod016574@...il.com>
To:     Jiri Slaby <jslaby@...e.cz>
Cc:     inaky.perez-gonzalez@...el.com, linux-wimax@...el.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] wimax: debug: fix a missing-check bug in d_parse_params()

On Wed, Jun 05, 2019 at 08:33:31AM +0200, Jiri Slaby wrote:
> On 30. 05. 19, 11:39, Gen Zhang wrote:
> > In d_parse_params(), 'params_orig' is allocated by kstrdup(). It returns
> > NULL when fails. So 'params_orig' should be checked.
> > 
> > Signed-off-by: Gen Zhang <blackgod016574@...il.com>
> > ---
> > diff --git a/include/linux/wimax/debug.h b/include/linux/wimax/debug.h
> > index aaf24ba..bacd6cb 100644
> > --- a/include/linux/wimax/debug.h
> > +++ b/include/linux/wimax/debug.h
> > @@ -496,6 +496,11 @@ void d_parse_params(struct d_level *d_level, size_t d_level_size,
> >  	if (_params == NULL)
> >  		return;
> >  	params_orig = kstrdup(_params, GFP_KERNEL);
> > +	if (!params_orig) {
> > +		printk(KERN_ERR "%s: can't duplicate string '%s'\n",
> > +		       tag, _params);
> 
> We use pr_err these days.
Thanks for your reply. I used printk() because at least in this file, 
printk() is used.

Should I change printk() to pr_err() and revise this patch, or should 
all printk() in this file be changed? I hope you can give me some 
specific instructions. Actually I don't know what to do when getting 
this reply...

Thanks
Gen
> 
> thanks,
> -- 
> js
> suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ