Skip to content

Commit

Permalink
ALSA: compress: info leak in snd_compr_get_caps()
Browse files Browse the repository at this point in the history
If the ->get_caps() function doesn't clear the buffer then there would
stack information leaked to userspace.  For example,
soc_compr_get_caps() can return success without clearing the buffer.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Dan Carpenter authored and Takashi Iwai committed Apr 22, 2013
1 parent f0283b5 commit 1c62e9f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sound/core/compress_offload.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ snd_compr_get_caps(struct snd_compr_stream *stream, unsigned long arg)
if (!stream->ops->get_caps)
return -ENXIO;

memset(&caps, 0, sizeof(caps));
retval = stream->ops->get_caps(stream, &caps);
if (retval)
goto out;
Expand Down

0 comments on commit 1c62e9f

Please sign in to comment.