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]
Date:	Tue, 13 Oct 2015 16:42:11 +0200
From:	Lars-Peter Clausen <lars@...afoo.de>
To:	Koro Chen <koro.chen@...iatek.com>
CC:	broonie@...nel.org, perex@...ex.cz, tiwai@...e.de,
	lgirdwood@...il.com, alsa-devel@...a-project.org,
	srv_heupstream@...iatek.com, s.hauer@...gutronix.de,
	linux-kernel@...r.kernel.org, linux-mediatek@...ts.infradead.org,
	p.zabel@...gutronix.de, linux-arm-kernel@...ts.infradead.org
Subject: Re: [alsa-devel] [RFC PATCH] ASoC: Modify check condition of multiple
 bindings of components

On 10/13/2015 04:18 PM, Koro Chen wrote:
> On Tue, 2015-10-13 at 15:44 +0200, Lars-Peter Clausen wrote:
>> On 10/13/2015 03:37 PM, Koro Chen wrote:
>>> The patch "ASoC: Prevent components from being bound to multiple cards"
>>> adds check to prevent multiple cards from using the same component.
>>> However, snd_soc_register_platform() or snd_soc_register_codec() will
>>> also create components, and sharing the same platform by multiple cards
>>> is then refused. This happens with a platform having multiple
>>> independent DAIs that share the same DMA controller.
>>>
>>> Relax the condition by checking component->registered_as_component,
>>> which is only true in case of snd_soc_register_component() and
>>> will be false for components created by snd_soc_register_platform()
>>> or snd_soc_register_codec().
>>
>> Binding a component to multiple cards results in internal data structure
>> corruption, regardless of whether it is a raw component, CODEC or platform,
>> which is why the check was added. So the proposed change wont work.
>>
> Thanks for your comment. Is it possible to share an example of how the
> data structure will be corrupted? So I can study into this further.

Just look at soc_probe_component() and think about what happens if that runs
twice for two different cards. Multiple calls to list_add() on the same
list, controls are added multiple times, DAPM widgets are created multiple
times, the card field will only point to the last card.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ