<html>
    <head>
      <base href="https://bugzilla.libav.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Null pointer dereference in ff_h264_execute_ref_pic_marking()"
   href="https://bugzilla.libav.org/show_bug.cgi?id=1006">1006</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Null pointer dereference in ff_h264_execute_ref_pic_marking()
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Libav
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>git HEAD
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>X86
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>---
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>libavcodec
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>bugzilla@libav.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>fumfi.255@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=634" name="attach_634" title="POC to trigger null pointer dereference (avprobe)">attachment 634</a> <a href="attachment.cgi?id=634&action=edit" title="POC to trigger null pointer dereference (avprobe)">[details]</a></span>
POC to trigger null pointer dereference (avprobe)

After some fuzz testing I found a crashing test case.

Command: avprobe libav_nullptr_ff_h264_execute_ref_pic_marking_l677

Git Head: f9edc734e0ca3f6ef06c1ad0bd2c19c0c66f1ffa

Output + ASAN:

avprobe version v13_dev0-673-gf9edc73, Copyright (c) 2007-2016 the Libav
developers
  built on Dec 22 2016 08:45:30 with clang version 3.9.0
(tags/RELEASE_390/final)
[h264 @ 0x619000000080] left block unavailable for requested intra4x4 mode -1
[h264 @ 0x619000000080] error while decoding MB 0 0, bytestream -3
[h264 @ 0x619000000080] data partitioning is not implemented. Update your Libav
version to the newest one from Git. If the problem still occurs, it means that
your file has a feature which has not been implemented.
[h264 @ 0x619000000080] If you want to help, upload a sample of this file to
<a href="ftp://upload.libav.org/incoming/">ftp://upload.libav.org/incoming/</a> and contact the libav-devel mailing list.
ASAN:DEADLYSIGNAL
=================================================================
==28027==ERROR: AddressSanitizer: SEGV on unknown address 0x0000000000a8 (pc
0x000001bc2735 bp 0x62e00000666c sp 0x7ffd2a92b2d0 T0)
==28027==The signal is caused by a READ memory access.
==28027==Hint: address points to the zero page.
    #0 0x1bc2734 in ff_h264_execute_ref_pic_marking
XYZ/libav/libavcodec/h264_refs.c:677:36
    #1 0x1bb999e in ff_h264_field_end
XYZ/libav/libavcodec/h264_picture.c:157:19
    #2 0x1bcdbe4 in ff_h264_queue_decode_slice
XYZ/libav/libavcodec/h264_slice.c:1888:17
    #3 0xbc5f38 in decode_nal_units XYZ/libav/libavcodec/h264dec.c:573:24
    #4 0xbc5f38 in h264_decode_frame XYZ/libav/libavcodec/h264dec.c:742
    #5 0x9f22c5 in decode_simple_internal XYZ/libav/libavcodec/decode.c:334:15
    #6 0x9f22c5 in decode_simple_receive_frame
XYZ/libav/libavcodec/decode.c:390
    #7 0x9f22c5 in decode_receive_frame_internal
XYZ/libav/libavcodec/decode.c:408
    #8 0x9f1084 in avcodec_send_packet XYZ/libav/libavcodec/decode.c:445:15
    #9 0x82d5fb in try_decode_frame XYZ/libav/libavformat/utils.c:1950:19
    #10 0x827143 in avformat_find_stream_info
XYZ/libav/libavformat/utils.c:2459:9
    #11 0x4f6659 in open_input_file XYZ/libav/avprobe.c:866:16
    #12 0x4f6659 in probe_file XYZ/libav/avprobe.c:944
    #13 0x4f6659 in main XYZ/libav/avprobe.c:1178
    #14 0x7f54db40482f in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #15 0x41a948 in _start (/usr/local/bin/avprobe+0x41a948)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV XYZ/libav/libavcodec/h264_refs.c:677:36 in
ff_h264_execute_ref_pic_marking
==28027==ABORTING</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are watching all bug changes.</li>
      </ul>
    </body>
</html>