[mrtdump branch] Segfault when using a long filename for mrtdump

Pavel Tvrdík pavel.tvrdik at nic.cz
Wed Apr 27 10:27:40 CEST 2016


Hi Baptiste,

the bug should be fixed! Pull a new commit from GIT or download a mail 
attachment.

Thanks,
Pavel

On 2016-04-26 17:37, Pavel Tvrdík wrote:
> Hi Baptiste!
> 
> On 2016-04-26 16:46, Baptiste Jonglez wrote:
>> Hi,
>> 
>> I have been experimenting with the mrtdump branch (commit cc4eee62) on
>> Debian jessie.
> 
> Thank you for testing experimental code from GIT!
> 
>> 
>> However, when using a moderately long filename, Bird crashes.
>> For instance:
>> 
>>     birdc6 'mrtdump routes to "/bird/mrtdump/rib.ipv6.20160426.1209"'
>>     BIRD 1.5.0 ready.
>>     Connection closed by server.
>> 
>> The logs are the following:
>> 
>>     bird6[8314]: Unable to open file "<too-long>" for MRT dump of 
>> table master
>>     systemd[1]: bird6.service: main process exited, code=killed, 
>> status=11/SEGV
>>     systemd[1]: Unit bird6.service entered failed state.
>>     kernel: bird6[8314]: segfault at 18 ip 00007fb05162a905 sp
>> 00007ffe1194f5a0 error 4 in bird6[7fb051602000+76000]
>> 
>> It looks like TM_DATETIME_BUFFER_SIZE, as used in 
>> tm_format_datetime(), is
>> really too small (32 bytes).  Also, there seems to be an issue with 
>> error
>> handling (segfault when tm_format_datetime returns unexpected data).
>> 
>> When defining a higher value for TM_DATETIME_BUFFER_SIZE, bird does 
>> not
>> crash anymore, but there is certainly a better solution.
> 
> Yes, exactly. I'll send a patch tomorrow!
> 
>> Thanks,
>> Baptiste
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-MRT-Dump-Fix-bug-with-longer-filename-formats.patch
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20160427/31d1b63c/attachment.ksh>


More information about the Bird-users mailing list