[FFmpeg-trac] #6763(swscale:new): swscale: Out-of-bounds memory accesses

FFmpeg trac at avcodec.org
Wed Dec 18 13:35:51 EET 2024


#6763: swscale: Out-of-bounds memory accesses
------------------------------------+-----------------------------------
             Reporter:  Gramner     |                    Owner:  (none)
                 Type:  defect      |                   Status:  new
             Priority:  important   |                Component:  swscale
              Version:  git-master  |               Resolution:
             Keywords:  crash       |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+-----------------------------------
Comment (by Niklas Haas):

 It's worth pointing out that these alignment requirements are actually
 explicitly mentioned, albeit in the documentation for AVFrame:

 https://ffmpeg.org/doxygen/2.7/frame_8h_source.html#l00191

 Admittedly, this is a very non-obvious place, and also doesn't extend to
 `sws_scale()`.

 After investigating the situation more closely, I have come to notice that
 practically none of the asm routines are designed to handle images whose
 stride is not a multiple of at least 8, and I am leaning towards disabling
 the offending ASM routines entirely as an immediate fix.

 A full fix (with a split C wrapper to handle the edges) would be the
 preferred solution long-term, but this will require a more substantial
 rewrite of the scaling core - something that is on my to-do list for 2025.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/6763#comment:5>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list