Re: [PATCH v2] media: coda: fix out-of-bounds read when parsing H.264 SPS profile
From: Nicolas Dufresne
Date: Mon Nov 30 2026 - 13:31:47 EST
On Fri, 06 Nov 2026 21:54:55 +0900, hyunjungg wrote:
> coda_sps_parse_profile() scans the compressed OUTPUT-plane buffer
> supplied by userspace via VIDIOC_QBUF for an SPS NAL unit and then reads
> the profile_idc (buf[0]) and level_idc (buf[2]) that follow the NAL unit
> header byte. Neither the NAL scanning helper nor the final dereferences
> are bounded against the end of the payload:
>
> - coda_find_nal_header() dereferences *buf++ before checking buf
> against end, so it reads one byte past the payload when it is
> entered with buf == end (e.g. a zero-length or start-code-terminated
> buffer).
>
> [...]
Applied, thanks!
[1/1] media: coda: fix out-of-bounds read when parsing H.264 SPS profile
commit: ec7f6a3a88b57e7c97b0d6ae06c0fbdffc8e30a0
Best regards,
--
Nicolas Dufresne <nicolas.dufresne@xxxxxxxxxxxxx>