[vlc-devel] [PATCH] src: input/stream: fix buffer underflow by avoiding inconsistent state in error case

naich64 . david.fuhrmann at gmail.com
Thu Jul 3 18:35:20 CEST 2014

2014-07-03 10:20 GMT+02:00 Rémi Denis-Courmont <remi at remlab.net>:
Le 2014-07-02 23:48, David Fuhrmann a écrit :

Ping for ideas, and opinions about the existing patch(es)?

None of the developers who wrote this code are still active, so it should come to you as no surprises that asking for explanations elicits no useful answers.

Either you rewrite your patch in a way that makes sense, or you leave the code as is.

Hello all,

I think that the patch make some sense, and I already explained why in my last mail in detail.

Especially because nobody of the original developers is still active, I would like to also get the opinions from other active developers. If it is common sense also among other devs that the patch is too hackish, it is fine with me.

But if it is only you that basically criticize that "the patch look fishy", and it "probably does not fix the root of the problem", then this is not really an acceptable reason for me to reject the patch. I already tried to explain in detail why I think that the patch should be applied at least as an intermediate solution. Unfortunately, for me it looks like you ignored most of my explanations, and gave no more concrete objections to those.

In summary: If you look at at the code just some lines above the patch it is inevitable that the unsigned underflow can happen, and this case is already sort of taken into account in the modified error path. What was missing is setting the internal state to sane values again - which is common practice for error paths where the state is accessed afterwards.

The underlying bug is reproducible and visible, with different files and on different OS and hardware versions. Thus, I see the bug as a blocker for the 2.2 release. Because of the complexity of the underlying code and lack of time and code knowledge, I do not see that I (or felix) will find a better solution soon.

So its better to avoid an uncontrollable crash instead of leaving it open, if it will not properly fixed in the near future. Due to the invalid memory access it might be even supposable that this forms a security vulnerability, but I did not further checked that.

Because of the mentioned reasons, I think that the decision about the patch should not be done only by you (Remi), but also involving opinions of the other core devs.

For reference, I attached the minimal patch with is needed to fix the bug (#11488) and which is in question, basically.

With best regards,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20140703/8c54209d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-src-input-stream-fix-buffer-underflow-by-avoiding-in.patch
Type: application/octet-stream
Size: 1469 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20140703/8c54209d/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20140703/8c54209d/attachment-0001.html>

More information about the vlc-devel mailing list