[Pkg-clamav-devel] Bug#824485: Bug#824485: clamav-freshclam: Segfault

Sebastian Andrzej Siewior sebastian at breakpoint.cc
Wed May 18 11:11:39 UTC 2016


On 2016-05-16 19:33:58 [+0200], Kurt Roeckx wrote:
> I'm guessing there is some ABI breakage between the 2 versions.

So now learnt how to use/ read abipkgdiff properly:

|  in unqualified underlying type 'struct cl_engine' at others.h:250:1:
|    type size changed from 8640 to 8704 bits
|    1 data member insertion:
|      'cli_matcher* cl_engine::test_root', at offset 1472 (in bits) at others.h:312:1

it is not *that* obvious. cl_engine is an anonymous struct used as
handle so a change here should not matter. However clamd + freshclam
know the struct, access the members directly and pass members from it to
other functions from the library like cli_bytecode_prepare2() where the
booooom happens. The member insertion moved one pointer which was read
in freshclam and passed to the library.
Since this function is declared as CLAMAV_PRIVATE nobody but clamav
itself should access it. Also the struct is not publicly exported so
the damage is really contained within the clamav package. As a
consequence I'm going make sure that we bumb the private symbols in the
symbols file on each major release to ensure that all packages from this
source package depend on the latest libclamav7 if they need it.

> Kurt
Sebastian



More information about the Pkg-clamav-devel mailing list