mbox series

[0/6] ASoC: Sanity checks and soc-topology updates

Message ID 20211015161257.27052-1-cezary.rojewski@intel.com (mailing list archive)
Headers show
Series ASoC: Sanity checks and soc-topology updates | expand

Message

Cezary Rojewski Oct. 15, 2021, 4:12 p.m. UTC
Couple of soc-topology related changes and a use-after-free fix. Said fix
and two sanity checks for soc-topology lead the way. While the
use-after-free is quite obvious, the sanity checks are here to cover for
cases where user malformed the topology file -or- access to filesystem
somehow got interrupted during copy operation. We shouldn't be reading
outside the file boundary.

Afterward a change to soc_tplg_add_kcontrol(): device being passed to
soc_tplg_add_dcontrol() from comp->dev to tplg->dev which corrects
dev_xxx() invoked later on.
Also, device used for topology memory allocations from component->dev to
component->card->dev so memory gets freed each time card device (usually
platform device) is removed rather than the component device what may
happen less frequently.

Dummy component gets smarter and no longer overrides hw_params if
there are other components accociated with related struct
snd_soc_pcm_runtime instance.

Amadeusz Sławiński (5):
  ASoC: core: Remove invalid snd_soc_component_set_jack call
  ASoC: topology: Check for dapm widget completeness
  ASoC: topology: Use correct device for prints
  ASoC: topology: Change topology device to card device
  ASoC: Stop dummy from overriding hwparams

Cezary Rojewski (1):
  ASoC: topology: Add header payload_size verification

 sound/soc/soc-core.c     |  3 ---
 sound/soc/soc-topology.c | 34 ++++++++++++++++++++++++++++++----
 sound/soc/soc-utils.c    | 13 +++++++++++++
 3 files changed, 43 insertions(+), 7 deletions(-)

Comments

Mark Brown Oct. 29, 2021, 8:54 p.m. UTC | #1
On Fri, 15 Oct 2021 18:12:51 +0200, Cezary Rojewski wrote:
> Couple of soc-topology related changes and a use-after-free fix. Said fix
> and two sanity checks for soc-topology lead the way. While the
> use-after-free is quite obvious, the sanity checks are here to cover for
> cases where user malformed the topology file -or- access to filesystem
> somehow got interrupted during copy operation. We shouldn't be reading
> outside the file boundary.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/6] ASoC: core: Remove invalid snd_soc_component_set_jack call
      commit: 7db53c21b1c3c25676d1125049bc92c756421cd6
[2/6] ASoC: topology: Add header payload_size verification
      commit: 86e2d14b6d1a68941b6c0ef39502ec1433b680cb
[3/6] ASoC: topology: Check for dapm widget completeness
      commit: 2e288333e9e0a14f9895321a848992b25a0e5563
[4/6] ASoC: topology: Use correct device for prints
      commit: 2a710bb35a5abfbca48ed7c229205ace472692d3
[5/6] ASoC: topology: Change topology device to card device
      commit: f714fbc1e89a3533b2578e0c90ce4f5c05a57f96
[6/6] ASoC: Stop dummy from overriding hwparams
      commit: 6c504663ba2ee2abeaf5622e27082819326c1bd4

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark