[opus] opus Digest, Vol 90, Issue 4

Tristan Matthews tmatth at videolan.org
Wed Jul 6 05:31:31 UTC 2016


On Wed, Jul 6, 2016 at 1:17 AM, Logan Stromberg
<loganstromberg at gmail.com> wrote:
>> I don't believe this is an actual error. If it's truly possible for
>> these areas to overlap (I don't think it is), then something much more
>> serious than using memmove instead of memcpy needs to be done about it.
>
> In the C# version of this code, these two copy regions are stored in
> separate arrays entirely. I agree that there should be no normal way to have
> the memcpy overlap here (not excluding a malicious buffer overflow attack or
> something). Does this patch demonstrably fix the bug cited (1227580)?

The "bug" in question was just a false positive from coverity. Ralph
added a sanity check to ensure this was the case:
https://git.xiph.org/?p=opus.git;a=commit;h=c3563be66f16a5c84ba400eea4ee119ced0789fb

Best,
Tristan

>
> On Tue, Jul 5, 2016 at 5:00 AM, <opus-request at xiph.org> wrote:
>>
>> Send opus mailing list submissions to
>>         opus at xiph.org
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>>         http://lists.xiph.org/mailman/listinfo/opus
>> or, via email, send a message with subject or body 'help' to
>>         opus-request at xiph.org
>>
>> You can reach the person managing the list at
>>         opus-owner at xiph.org
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of opus digest..."
>>
>>
>> Today's Topics:
>>
>>    1. [PATCH] SILK: use silk_memmove for potentially overlapping
>>       areas (Tristan Matthews)
>>    2. Re: [PATCH] SILK: use silk_memmove for potentially
>>       overlapping areas (Timothy B. Terriberry)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Mon,  4 Jul 2016 09:18:12 -0400
>> From: Tristan Matthews <tmatth at videolan.org>
>> To: opus at xiph.org
>> Cc: Tristan Matthews <tmatth at videolan.org>
>> Subject: [opus] [PATCH] SILK: use silk_memmove for potentially
>>         overlapping     areas
>> Message-ID: <1467638292-19376-1-git-send-email-tmatth at videolan.org>
>>
>> Fixes CID 1227580
>> ---
>>  silk/process_NLSFs.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/silk/process_NLSFs.c b/silk/process_NLSFs.c
>> index c27cf03..d9123ef 100644
>> --- a/silk/process_NLSFs.c
>> +++ b/silk/process_NLSFs.c
>> @@ -100,6 +100,6 @@ void silk_process_NLSFs(
>>
>>      } else {
>>          /* Copy LPC coefficients for first half from second half */
>> -        silk_memcpy( PredCoef_Q12[ 0 ], PredCoef_Q12[ 1 ],
>> psEncC->predictLPCOrder * sizeof( opus_int16 ) );
>> +        silk_memmove( PredCoef_Q12[ 0 ], PredCoef_Q12[ 1 ],
>> psEncC->predictLPCOrder * sizeof( opus_int16 ) );
>>      }
>>  }
>> --
>> 2.8.1
>>
>>
>>
>> ------------------------------
>>
>> Message: 2
>> Date: Mon, 04 Jul 2016 06:32:32 -0700
>> From: "Timothy B. Terriberry" <tterribe at xiph.org>
>> To: opus at xiph.org
>> Subject: Re: [opus] [PATCH] SILK: use silk_memmove for potentially
>>         overlapping areas
>> Message-ID: <577A6570.4030802 at xiph.org>
>> Content-Type: text/plain; charset=UTF-8; format=flowed
>>
>> Tristan Matthews wrote:
>> > Fixes CID 1227580
>>
>> I don't believe this is an actual error. If it's truly possible for
>> these areas to overlap (I don't think it is), then something much more
>> serious than using memmove instead of memcpy needs to be done about it.
>>
>>
>> ------------------------------
>>
>> Subject: Digest Footer
>>
>> _______________________________________________
>> opus mailing list
>> opus at xiph.org
>> http://lists.xiph.org/mailman/listinfo/opus
>>
>>
>> ------------------------------
>>
>> End of opus Digest, Vol 90, Issue 4
>> ***********************************
>
>
>
> _______________________________________________
> opus mailing list
> opus at xiph.org
> http://lists.xiph.org/mailman/listinfo/opus
>


More information about the opus mailing list