diff options
| author | Nicolas Boichat <drinkcat@chromium.org> | 2016-01-18 21:35:00 +0800 |
|---|---|---|
| committer | Luis Henriques <luis.henriques@canonical.com> | 2016-02-02 19:09:58 +0000 |
| commit | 1fe687657cb449192e148abc0823d459b51be642 (patch) | |
| tree | 404e050e9a3e00078fd2d85c786f549dae376bfc /include/linux | |
| parent | 4238f492b693a43607f7a02007421d954769531a (diff) | |
ALSA: pcm: Fix snd_pcm_hw_params struct copy in compat mode
commit 43c54b8c7cfe22f868a751ba8a59abf1724160b1 upstream.
This reverts one hunk of
commit ef44a1ec6eee ("ALSA: sound/core: use memdup_user()"), which
replaced a number of kmalloc followed by memcpy with memdup calls.
In this case, we are copying from a struct snd_pcm_hw_params32 to
a struct snd_pcm_hw_params, but the latter is 4 bytes longer than
the 32-bit version, so we need to separate kmalloc and copy calls.
This actually leads to an out-of-bounds memory access later on
in sound/soc/soc-pcm.c:soc_pcm_hw_params() (detected using KASan).
Fixes: ef44a1ec6eee ('ALSA: sound/core: use memdup_user()')
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
