1. 09 Mar, 2020 1 commit
    • Takashi Iwai's avatar
      ALSA: pcm: oss: Avoid plugin buffer overflow · f2ecf903
      Takashi Iwai authored
      Each OSS PCM plugins allocate its internal buffer per pre-calculation
      of the max buffer size through the chain of plugins (calling
      src_frames and dst_frames callbacks).  This works for most plugins,
      but the rate plugin might behave incorrectly.  The calculation in the
      rate plugin involves with the fractional position, i.e. it may vary
      depending on the input position.  Since the buffer size
      pre-calculation is always done with the offset zero, it may return a
      shorter size than it might be; this may result in the out-of-bound
      access as spotted by fuzzer.
      
      This patch addresses those possible buffer overflow accesses by simply
      setting the upper limit per the given buffer size for each plugin
      before src_frames() and after dst_frames() calls.
      
      Reported-by: syzbot+e1fe9f44fb8ecf4fb5dd@syzkaller.appspotmail.com
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/000000000000b25ea005a02bcf21@google.com
      Link: https://lore.kernel.org/r/20200309082148.19855-1-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      f2ecf903
  2. 07 Mar, 2020 1 commit
  3. 06 Mar, 2020 1 commit
  4. 05 Mar, 2020 5 commits
  5. 04 Mar, 2020 1 commit
    • Olivier Moysan's avatar
      ASoC: stm32: sai: manage rebind issue · 0d6defc7
      Olivier Moysan authored
      The commit e894efef ("ASoC: core: add support to card rebind")
      allows to rebind the sound card after a rebind of one of its component.
      With this commit, the sound card is actually rebound,
      but may be no more functional. The following problems have been seen
      with STM32 SAI driver.
      
      1) DMA channel is not requested:
      
      With the sound card rebind the simplified call sequence is:
      stm32_sai_sub_probe
      	snd_soc_register_component
      		snd_soc_try_rebind_card
      			snd_soc_instantiate_card
      	devm_snd_dmaengine_pcm_register
      
      The problem occurs because the pcm must be registered,
      before snd_soc_instantiate_card() is called.
      
      Modify SAI driver, to change the call sequence as follows:
      stm32_sai_sub_probe
      	devm_snd_dmaengine_pcm_register
      	snd_soc_register_component
      		snd_soc_try_rebind_card
      
      2) DMA channel is not released:
      
      dma_release_channel() is not called when
      devm_dmaengine_pcm_release() is executed.
      This occurs because SND_DMAENGINE_PCM_DRV_NAME component,
      has already been released through devm_component_release().
      
      devm_dmaengine_pcm_release() should be called before
      devm_component_release() to avoid this problem.
      
      Call snd_dmaengine_pcm_unregister() and snd_soc_unregister_component()
      explicitly from SAI driver, to have the right sequence.
      Signed-off-by: default avatarOlivier Moysan <olivier.moysan@st.com>
      Message-Id: <20200304102406.8093-1-olivier.moysan@st.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      0d6defc7
  6. 03 Mar, 2020 2 commits
  7. 02 Mar, 2020 1 commit
  8. 28 Feb, 2020 2 commits
  9. 26 Feb, 2020 1 commit
  10. 24 Feb, 2020 2 commits
  11. 21 Feb, 2020 1 commit
  12. 20 Feb, 2020 2 commits
  13. 19 Feb, 2020 6 commits
  14. 18 Feb, 2020 4 commits
  15. 17 Feb, 2020 4 commits
  16. 14 Feb, 2020 5 commits
  17. 13 Feb, 2020 1 commit