Fwd: [pidgin-security] possible segfault in perl wrapper
tomasz at wasilczyk.pl
Thu Apr 11 21:30:32 EDT 2013
please read this short discussion and give me opinion, what should I
do. Should I treat this as security fix and postpone committing until
just before release?
---------- Forwarded message ----------
From: Ben Laurie <benl at google.com>
Subject: Re: [pidgin-security] possible segfault in perl wrapper
To: Tomasz Wasilczyk <tomasz at wasilczyk.pl>
On 10 April 2013 18:57, Tomasz Wasilczyk <tomasz at wasilczyk.pl> wrote:
> I have found a theoretically possible segfault in perl wrapper.
> Libpurple wraps purple_network_ip_atoi  with . The first one
> returns 4-byte buffer, but the second one returns C-string (because of
>  mapping). Result: 4-byte raw buffer is copied as C-string using
> I hardly believe, that anyone is affected, because this function
> doesn't seems to have ever been working.
> Also: do you think, that such bug should be treated as "sensitive", or
> can be safely assumed that no one actually uses that feature.
Sounds to me that it might have been used, in fact, since 0s in real
IP addresses are relatively rare (there was a time when lots of things
broke if you had a 0 anywhere), so the string copy will _usually_
yield the right value (plus a buffer overflow!). So, I suspect it
should be considered somewhat sensitive.
> Proposed solution:
> remove it from Pidgin 3.0.0 and disable in 2.x.y.
>  https://hg.pidgin.im/pidgin/main/file/90201925e1fe/libpurple/network.c#l125
>  https://hg.pidgin.im/pidgin/main/file/90201925e1fe/libpurple/plugins/perl/common/Network.xs#l22
>  https://hg.pidgin.im/pidgin/main/file/90201925e1fe/libpurple/plugins/perl/common/typemap#l33
More information about the security