mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-10-31 18:09:19 +00:00
1d58fb16a8
The SNDRV_RAWMIDI_STREAM_{OUTPUT,INPUT} ioctls may reallocate runtime->buffer while other kernel threads are accessing it. If the underlying krealloc() call frees the original buffer, then this can turn into a use-after-free. Most of these accesses happen while the thread is holding runtime->lock, and can be fixed by just holding the same lock while replacing runtime->buffer, however we can't hold this spinlock while snd_rawmidi_kernel_{read1,write1} are copying to/from userspace. We need to add and acquire a new mutex to prevent this from happening concurrently with reallocation. We hold this mutex during the entire reallocation process, to also prevent multiple concurrent reallocations leading to a double-free. Signed-off-by: Daniel Rosenberg <drosen@google.com> bug: 64315347 Change-Id: I05764d4f1a38f373eb7c0ac1c98607ee5ff0eded |
||
---|---|---|
.. | ||
ac97_codec.h | ||
aci.h | ||
ad1816a.h | ||
ad1843.h | ||
adau1373.h | ||
adsp_err.h | ||
aess.h | ||
ak4xxx-adda.h | ||
ak4113.h | ||
ak4114.h | ||
ak4117.h | ||
ak4531_codec.h | ||
ak4641.h | ||
alc5623.h | ||
apr_audio-v2.h | ||
apr_audio.h | ||
asequencer.h | ||
asound.h | ||
asoundef.h | ||
atmel-abdac.h | ||
atmel-ac97c.h | ||
audio_cal_utils.h | ||
audio_calibration.h | ||
audio_slimslave.h | ||
compress_driver.h | ||
control.h | ||
core.h | ||
cpe_cmi.h | ||
cpe_core.h | ||
cs42l52.h | ||
cs4231-regs.h | ||
cs4271.h | ||
cs8403.h | ||
cs8427.h | ||
da7213.h | ||
da9055.h | ||
designware_i2s.h | ||
dmaengine_pcm.h | ||
emu10k1.h | ||
emu10k1_synth.h | ||
emu8000.h | ||
emu8000_reg.h | ||
emux_legacy.h | ||
emux_synth.h | ||
es1688.h | ||
gus.h | ||
hda_hwdep.h | ||
hwdep.h | ||
i2c.h | ||
info.h | ||
initval.h | ||
jack.h | ||
l3.h | ||
max9768.h | ||
max98088.h | ||
max98090.h | ||
max98095.h | ||
memalloc.h | ||
minors.h | ||
mixer_oss.h | ||
mpu401.h | ||
msm-audio-effects-q6-v2.h | ||
msm-dai-q6-v2.h | ||
msm-slim-dma.h | ||
opl3.h | ||
opl4.h | ||
pcm-indirect.h | ||
pcm.h | ||
pcm_oss.h | ||
pcm_params.h | ||
pt2258.h | ||
pxa2xx-lib.h | ||
q6adm-v2.h | ||
q6afe-v2.h | ||
q6asm-v2.h | ||
q6audio-v2.h | ||
q6core.h | ||
q6lsm.h | ||
rawmidi.h | ||
rt5659.h | ||
s3c24xx_uda134x.h | ||
sb.h | ||
sb16_csp.h | ||
seq_device.h | ||
seq_kernel.h | ||
seq_midi_emul.h | ||
seq_midi_event.h | ||
seq_oss.h | ||
seq_oss_legacy.h | ||
seq_virmidi.h | ||
sh_dac_audio.h | ||
sh_fsi.h | ||
simple_card.h | ||
snd_wavefront.h | ||
soc-dai.h | ||
soc-dapm.h | ||
soc-dpcm.h | ||
soc.h | ||
soundfont.h | ||
spear_dma.h | ||
spear_spdif.h | ||
sta32x.h | ||
tas5086.h | ||
tea575x-tuner.h | ||
tea6330t.h | ||
timer.h | ||
tlv.h | ||
tlv320aic3x.h | ||
tlv320aic32x4.h | ||
tlv320dac33-plat.h | ||
tpa6130a2-plat.h | ||
uda134x.h | ||
uda1380.h | ||
util_mem.h | ||
voice_params.h | ||
voice_svc.h | ||
vx_core.h | ||
wavefront.h | ||
wm0010.h | ||
wm1250-ev1.h | ||
wm2000.h | ||
wm2200.h | ||
wm5100.h | ||
wm8903.h | ||
wm8904.h | ||
wm8955.h | ||
wm8960.h | ||
wm8962.h | ||
wm8993.h | ||
wm8996.h | ||
wm9081.h | ||
wm9090.h | ||
wss.h |