]> git.kaiwu.me - nginx.git/commit
Mp4: fixed buffer underread while updating stsz atom.
authorRoman Arutyunyan <arut@nginx.com>
Mon, 12 Aug 2024 14:20:43 +0000 (18:20 +0400)
committerRoman Arutyunyan <arut@nginx.com>
Mon, 12 Aug 2024 14:20:43 +0000 (18:20 +0400)
commit3dc0fba5adec4c033eed76976f7275f2af7d5ddd
treede65c44639aa78a3a61a23382db0edc460134010
parente1daadc3883ad94e0c450ad46e8f11ad5539dcfc
Mp4: fixed buffer underread while updating stsz atom.

While cropping an stsc atom in ngx_http_mp4_crop_stsc_data(), a 32-bit integer
overflow could happen, which could result in incorrect seeking and a very large
value stored in "samples".  This resulted in a large invalid value of
trak->end_chunk_samples.  This value is further used to calculate the value of
trak->end_chunk_samples_size in ngx_http_mp4_update_stsz_atom().  While doing
this, a large invalid value of trak->end_chunk_samples could result in reading
memory before stsz atom start.  This could potentially result in a segfault.
src/http/modules/ngx_http_mp4_module.c