Prasad J Pandit 369ff955a8 es1370: check total frame count against current frame
A guest user may set channel frame count via es1370_write()
such that, in es1370_transfer_audio(), total frame count
'size' is lesser than the number of frames that are processed
'cnt'.

    int cnt = d->frame_cnt >> 16;
    int size = d->frame_cnt & 0xffff;

if (size < cnt), it results in incorrect calculations leading
to OOB access issue(s). Add check to avoid it.

Reported-by: Ren Ding <rding@gatech.edu>
Reported-by: Hanqing Zhao <hanqing@gatech.edu>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Message-id: 20200514200608.1744203-1-ppandit@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-25 11:30:03 +02:00
..
2020-05-04 14:43:22 +02:00
2020-05-04 14:43:22 +02:00
2020-03-25 09:55:40 +01:00
2017-05-04 09:16:05 +02:00
2017-05-04 09:16:05 +02:00
2020-05-15 07:08:14 +02:00
2019-08-16 13:31:53 +02:00
2019-03-07 21:45:53 +01:00
2019-08-16 13:31:52 +02:00
2019-08-16 13:31:52 +02:00