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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <s5h4md87hnu.wl-tiwai@suse.de>
Date:	Tue, 16 Feb 2016 17:18:29 +0100
From:	Takashi Iwai <tiwai@...e.de>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	linux-arm-kernel@...ts.infradead.org, alsa-devel@...a-project.org,
	linux-kernel@...r.kernel.org, Jaroslav Kysela <perex@...ex.cz>,
	Mark Brown <broonie@...nel.org>, Han Lu <han.lu@...el.com>,
	Libin Yang <libin.yang@...ux.intel.com>,
	Thierry Reding <treding@...dia.com>,
	David Henningsson <david.henningsson@...onical.com>
Subject: Re: [PATCH] sound: hdmi: avoid dereferencing uninitialized 'jack' pointer

On Tue, 16 Feb 2016 17:09:43 +0100,
Arnd Bergmann wrote:
> 
> On Tuesday 16 February 2016 16:49:42 Takashi Iwai wrote:
> > 
> > Thanks for the patch.  But I think it's cleaner to fix Kconfig.
> > 
> > Thinking more of it, maybe splitting jack stuff as a separate module
> > and does reverse-select to CONFIG_INPUT would be better.  Then its
> > users can select simply SND_JACK, and everything would fit.
> > 
> > 
> 
> Adding 'select INPUT' is rather nasty, I think that can lead to circular
> dependencies, and would likely upset users of small embedded systems
> that want to use audio but don't want to use input.

Fair enough.

> Generally speaking, I would recommend never using 'select' on a user
> visible Kconfig symbol.
>
> Another option might would be to change snd_jack_new() to return
> an error if that SND_JACK is disabled, and then require all users
> to handle the error gracefully, i.e. not fail the probe() function
> but just not use the jack.

Yes, I thought of that, too.  If select is no good option, it's a good
alternative, indeed.


Takashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ