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] [thread-next>] [day] [month] [year] [list]
Message-ID: <32395.1422623364@turing-police.cc.vt.edu>
Date:	Fri, 30 Jan 2015 08:09:24 -0500
From:	Valdis.Kletnieks@...edu
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>,
	devel@...verdev.osuosl.org, Gulsah Kose <gulsah.1004@...il.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jarod Wilson <jarod@...sonet.com>,
	Mauro Carvalho Chehab <mchehab@....samsung.com>,
	linux-kernel@...r.kernel.org,
	Tuomas Tynkkynen <tuomas.tynkkynen@....fi>,
	Martin Kaiser <martin@...ser.cx>, linux-media@...r.kernel.org,
	Aya Mahfouz <mahfouz.saif.elyazal@...il.com>
Subject: Re: [PATCH] staging: media: lirc: lirc_zilog: Fix for possible null pointer dereference

On Fri, 30 Jan 2015 16:00:02 +0300, Dan Carpenter said:

> > > -	if (ir == NULL) {
> > > -		dev_err(ir->l.dev, "close: no private_data attached to the file
!\n");
> >
> > Yes, the dev_err() call is an obvious thinko.
> >
> > However, I'm not sure whether removing it entirely is right either.  If
> > there *should* be a struct IR * passed there, maybe some other printk()
> > should be issued, or even a WARN_ON(!ir), or something?
>
> We set filep->private_data to non-NULL in open() so I don't think it can
> be NULL here.

Then probably the *right* fix is to remove the *entire* if statement, as
we can't end up doing the 'return -ENODEV'....

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ