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: <164624045702.1145067.14385834637074739247.b4-ty@kernel.org>
Date:   Wed, 02 Mar 2022 17:00:57 +0000
From:   Mark Brown <broonie@...nel.org>
To:     lgirdwood@...il.com, tiwai@...e.com, perex@...ex.cz,
        Jiasheng Jiang <jiasheng@...as.ac.cn>, vkoul@...nel.org
Cc:     linux-kernel@...r.kernel.org, alsa-devel@...a-project.org
Subject: Re: [PATCH v2] ASoC: soc-compress: prevent the potentially use of null pointer

On Fri, 15 Oct 2021 08:13:53 +0000, Jiasheng Jiang wrote:
> There is one call trace that snd_soc_register_card()
> ->snd_soc_bind_card()->soc_init_pcm_runtime()
> ->snd_soc_dai_compress_new()->snd_soc_new_compress().
> In the trace the 'codec_dai' transfers from card->dai_link,
> and we can see from the snd_soc_add_pcm_runtime() in
> snd_soc_bind_card() that, if value of card->dai_link->num_codecs
> is 0, then 'codec_dai' could be null pointer caused
> by index out of bound in 'asoc_rtd_to_codec(rtd, 0)'.
> And snd_soc_register_card() is called by various platforms.
> Therefore, it is better to add the check in the case of misusing.
> And because 'cpu_dai' has already checked in soc_init_pcm_runtime(),
> there is no need to check again.
> Adding the check as follow, then if 'codec_dai' is null,
> snd_soc_new_compress() will not pass through the check
> 'if (playback + capture != 1)', avoiding the leftover use of
> 'codec_dai'.
> 
> [...]

Applied to

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

Thanks!

[1/1] ASoC: soc-compress: prevent the potentially use of null pointer
      commit: de2c6f98817fa5decb9b7d3b3a8a3ab864c10588

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ