Re: [PATCH] ASoC:codecs: lpass: Fix for KASAN use_after_free out of bounds

From: Mark Brown
Date: Tue May 09 2023 - 10:37:06 EST


On Tue, May 09, 2023 at 04:02:31PM +0530, Ravulapati Vishnu Vardhan Rao wrote:

> val = ucontrol->value.enumerated.item[0];
> + if (val < 0 && val > 15)
> + return -EINVAL;

Srini is right that it'd be better to read the upper bound from the
control, that way it can't geto out of sync.

Attachment: signature.asc
Description: PGP signature