No description
Find a file
Ruikai Peng cc43670268 avfilter/x86/vf_noise: Use unaligned access
Regression since: 3ba570de8b (port from MMX to SSE2).

The SSE2 inline asm in libavfilter/x86/vf_noise.c (line_noise_sse2 and
line_noise_avg_sse2) uses aligned loads/stores (movdqa, movntdq) but never
checks pointer alignment. When the filter reuses an input frame (common
path when av_frame_is_writable() is true), it may receive misaligned data
from upstream filters that adjust frame->data[i] in place, notably vf_crop:

- vf_crop adjusts plane pointers by arbitrary byte offsets
(frame->data[plane] += ...), so an x offset of 1 on 8-bit formats produces
a 1‑byte misalignment.
- The noise filter then calls the SSE2 path directly on those pointers
without realigning or falling back.

Repro on x86_64/SSE2 (current HEAD at that commit):

./ffmpeg -v error -f lavfi -i testsrc=s=320x240:rate=1 \
-vf "format=yuv420p,crop=w=319:x=1:h=240:exact=1,noise=alls=50" \
-frames:v 1 -f null -

This crashes with SIGSEGV at the aligned load in line_noise_sse2 (movdqa
(%r9,%rax),%xmm0; effective address misaligned by 1 byte).

Impact: denial of service via crafted filtergraphs (e.g., crop + noise).
Applies to planar 8-bit formats where upstream filters can shift data
pointers without reallocating.

Found-by: Pwno OSS Team
2025-12-12 19:25:21 +00:00
.forgejo forgejo/labeler: automatically flag Vulkan-related commits #20118 2025-12-07 19:41:58 +00:00
compat fftools: Fix MediaCodec on Android15+ 2025-11-23 12:53:43 +00:00
doc ffprobe: Include the RFC 4281 "mime codec string" in show_stream output 2025-12-12 18:40:01 +02:00
ffbuild configure: add detection of assembler support for SME 2025-12-09 21:38:38 +00:00
fftools ffprobe: Include the RFC 4281 "mime codec string" in show_stream output 2025-12-12 18:40:01 +02:00
libavcodec avcodec/vvc/refs: export in-band LCEVC side data in frames 2025-12-12 15:21:49 -03:00
libavdevice avdevice/gdigrab: suppress int to pointer cast warning 2025-12-03 23:45:44 +00:00
libavfilter avfilter/x86/vf_noise: Use unaligned access 2025-12-12 19:25:21 +00:00
libavformat avformat: Add av_mime_codec_str public API 2025-12-12 18:40:00 +02:00
libavutil avutil/aarch64/cpu: fix check for SME on Linux 2025-12-10 21:51:11 -03:00
libswresample swresample/soxr_resample: pass initialized data to soxr_process() in flush() 2025-12-08 21:31:13 +00:00
libswscale swscale/format: merge fmt_* helpers into a single fmt_analyze() 2025-12-09 09:47:48 +00:00
presets
tests ffprobe: Include the RFC 4281 "mime codec string" in show_stream output 2025-12-12 18:40:01 +02:00
tools tools/sofa2wavs: fix build on Windows 2025-11-29 21:43:12 +00:00
.gitattributes
.gitignore .gitignore: Add config_components.asm 2025-11-02 13:10:58 +00:00
.mailmap mailmap: add entry for myself 2025-08-08 21:51:15 +00:00
Changelog avfilter: D3D12 scale video filter support 2025-12-07 21:22:23 +00:00
configure configure: Fix detection of SME 2025-12-12 08:15:12 +00:00
CONTRIBUTING.md
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1 all: fix whitespace/new-line issues 2025-08-03 13:48:47 +02:00
COPYING.LGPLv3
CREDITS
FUNDING.json Add FUNDING.json 2025-06-23 14:48:40 +02:00
INSTALL.md all: fix typos found by codespell 2025-08-03 13:48:47 +02:00
LICENSE.md
MAINTAINERS MAINTAINERS: Update the entries for AMF 2025-10-28 21:06:37 +00:00
Makefile configure: add detection of assembler support for SME 2025-12-09 21:38:38 +00:00
README.md
RELEASE RELEASE: update to 8.0 2025-08-14 08:42:29 -04:00

FFmpeg README

FFmpeg is a collection of libraries and tools to process multimedia content such as audio, video, subtitles and related metadata.

Libraries

  • libavcodec provides implementation of a wider range of codecs.
  • libavformat implements streaming protocols, container formats and basic I/O access.
  • libavutil includes hashers, decompressors and miscellaneous utility functions.
  • libavfilter provides means to alter decoded audio and video through a directed graph of connected filters.
  • libavdevice provides an abstraction to access capture and playback devices.
  • libswresample implements audio mixing and resampling routines.
  • libswscale implements color conversion and scaling routines.

Tools

  • ffmpeg is a command line toolbox to manipulate, convert and stream multimedia content.
  • ffplay is a minimalistic multimedia player.
  • ffprobe is a simple analysis tool to inspect multimedia content.
  • Additional small tools such as aviocat, ismindex and qt-faststart.

Documentation

The offline documentation is available in the doc/ directory.

The online documentation is available in the main website and in the wiki.

Examples

Coding examples are available in the doc/examples directory.

License

FFmpeg codebase is mainly LGPL-licensed with optional components licensed under GPL. Please refer to the LICENSE file for detailed information.

Contributing

Patches should be submitted to the ffmpeg-devel mailing list using git format-patch or git send-email. Github pull requests should be avoided because they are not part of our review process and will be ignored.