security/clamav: Segmentation fault when running clamav in a 32-bit jail on a 64-bit host

Glen Barber glen.j.barber at gmail.com
Fri Aug 27 18:35:24 UTC 2010


On 8/27/10 2:20 PM, Jeremy Chadwick wrote:
>> To be honest, this is the first non-base software I've had an issue with
>> in a mixed-arch environment.
> 
> Okay, so it's sort of what I thought.  Your system has a series of
> include files on it that are for amd64 (64-bit), but clamav, when built
> within a 32-bit jail on that system, is (probably -- no proof, but it's
> an educated guess based on what's happening) detecting some 64-bit
> pieces through include files and making some incorrect assumptions about
> the size of some types.
> 
> I'd really need to set up a testbed system/VM and get full instructions
> from start to finish on how to set up a 32-bit jail and so on, given
> that I've never done it.  Otherwise, you're probably going to need to
> find someone who has a similar setup and can reproduce the problem, or
> give a developer root-level access to your system.
> 

I've also posted to the clamav-users@ list (but it was the backtrace
before -DWITH_DEBUG was set), but haven't had a reply.  Unfortunately,
this particular setup, I can't provide root access, however I might be
able to do so on one of my personal machines.  It will be some time
before I get everything set up properly though.

[snip]

> 
> I'm not sure how to explain this in a way that's easily understandable
> (I'm assuming you're not a programmer.  :-) ).  My guess is that during
> compile-time, the compiler is kicking out some code that's based on
> sizeof(int) == 8 (64-bit), when that shouldn't be the case in a 32-bit
> environment.  Include files could cause this problem too.
> 

Not a C programmer. :-)

> There may be some "black magic" in the ports infrastructure (maybe even
> on a per-port basis) to work around this problem that the clamav port
> isn't making use of.  I really don't know.
> 
> Sorry I can't be of more help.  I'm one of those guys who if he needs a
> 32-bit and 64-bit system, buys two physical systems.
> 

No problem.  I appreciate you taking the time to look at it this far.

Cheers,

-- 
Glen Barber


More information about the freebsd-ports mailing list