On 03/15/2013 10:16 AM, Gene Czarcinski wrote:
> On 03/15/2013 11:38 AM, Eric Blake wrote:
>> On 03/15/2013 07:48 AM, Gene Czarcinski wrote:
>>> One of the libvirt tests (conftest) has been segfaulting for some time
>>> with no indication of a test failure other than a message in syslog.  I
>>> verified this by building libvirt-1.0.3-1 with mock.
>> Generally, this is not an issue.  Autoconf tests INTENTIONALLY try to
>> probe for broken systems, in order to work around brokenness, so a
>> segfaulting conftest during ./configure just says that things are
>> probing as expected.  About the only thing that could be done to avoid a
>> segfault during ./configure is fixing the underlying broken system that
>> the probe was detecting in the first place, but that's more likely to be
>> a glibc or kernel fix, not a libvirt fix.
>>
> Isn't it a bit strange that it is broken under v1.0.3-maint but not
> under v1.0.2-maint?  The underlying system is the same.

It's not broken.  If instead you mean, "Isn't it strange that a
configure triggers a conftest segfault under v1.0.3-maint but not under
v1.0.2-maint?", the answer is no, it's not strange - v1.0.3 has more
probes entered into than v1.0.2, so the new segfault is probably due to
one of those added probes.

Knowing WHICH configure.ac probe is segfaulting might be nice, for
diagnosing why it is faulting and where to send a bug report upstream.
For example, if the bug is in glibc, then fixing glibc to not segfault
will fix every program that relies on glibc without probing for the bug
- but it will have no difference to libvirt which is already prepared to
work around the glibc bug.

Look through the config.log of your 1.0.3 build to see if it you can
quickly spot a test that failed with a segfault.  There's a wealth of
information in that file (maybe as simple as finding the string '$? =
139' or a message about a SEGV).  But again, a segfault of conftest
during configure is NORMAL, and nothing to panic about - it means that
the package is PROPERLY going to avoid tickling that bug later on when
the package is compiled.

In fact, just in typing that, I though of at least one glibc CVE bug in
re_compile_pattern, that still has not been fixed as of the glibc
currently in Fedora 18.  Furthermore, I know that this bug was reported
only recently, and that the version of gnulib used in v1.0.2 did not
check for this bug, while the version in v1.0.3 does (see libvirt commit
d09949e29 for where I updated to newer gnulib, precisely to work around
that glibc CVE).  So sure enough, I looked through my config.log and found:

configure:31277: checking for working re_compile_pattern
configure:31456: gcc -std=gnu99 -o conftest -g   conftest.c  >&5
configure:31456: $? = 0
configure:31456: ./conftest
*** glibc detected *** ./conftest: malloc(): memory corruption:
0x0000000000b31fc0 ***
./configure: line 3528: 15097 Segmentation fault      (core dumped)
./conftest$ac_exeext
configure:31456: $? = 139
configure: program exited with status 139

Libvirt is immune to that bug, but the CVE still affects other glibc
clients that use re_compile_pattern without being aware of the problems,
so you may want to put some pressure on the right people to fix
https://bugzilla.redhat.com/show_bug.cgi?id=905877.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to