Re: [PATCH] ALSA: pcm: Avoid reading beyond ELD monitor name
From: Takashi Iwai
Date: Fri Nov 20 2026 - 12:11:19 EST
On Fri, 20 Nov 2026 13:46:07 +0100,
Sreeraj S Kurup wrote:
>
> snd_parse_eld() checks that mnl bytes are available in the ELD
> buffer, but passes mnl + 1 as the source size to strscpy().
>
> When the monitor name is not NUL-terminated and the buffer ends
> immediately after the mnl bytes, strscpy() may read beyond the
> provided buffer.
>
> Copy exactly mnl bytes and explicitly terminate the destination
> to avoid accessing a byte beyond the validated input length.
>
> Signed-off-by: Sreeraj S Kurup <sreekuttan2156239@xxxxxxxxx>
Applied to for-next branch. Thanks.
Takashi