All of lore.kernel.org
 help / color / mirror / Atom feed
* clamav RWX
@ 2010-07-12  9:22 Russell Coker
  2010-07-12 11:01 ` Török Edwin
  0 siblings, 1 reply; 17+ messages in thread
From: Russell Coker @ 2010-07-12  9:22 UTC (permalink / raw)
  To: SE-Linux

cli_bytecode_init_jit() in libclamav/c++/bytecode2llvm.cpp in the clamav 
source tree has the following:

    sys::MemoryBlock B = sys::Memory::AllocateRWX(4096, NULL, &ErrMsg);
    if (B.base() == 0) {
        errs() << MODULE << ErrMsg << "\n";
#ifdef __linux__
        errs() << MODULE << "SELinux is preventing 'execmem' access. Run 
'setsebool -P clamd_use_jit on' to allow access\n";
#endif
        errs() << MODULE << "falling back to interpreter mode\n";
        return 0;
    } else {
        sys::Memory::ReleaseRWX(B);
    }

The fact that the developers assumed that SE Linux is the only mechanism that 
prevents RWX access is interesting.

Now the boolean in question only applies to the clamd_t domain not the 
freshclam_t domain, but for some reason freshclam uses the jit anyway.  Should 
we put in a dontaudit rule for freshclam_t or include it in the boolean 
section so that it gets execmem access if clamd_t gets it?

Also on my system the error message about SE Linux doesn't seem to get written 
to the log file, so I only found it by reading the source.

-- 
russell@coker.com.au
http://etbe.coker.com.au/          My Main Blog
http://doc.coker.com.au/           My Documents Blog

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2010-09-23 20:12 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-12  9:22 clamav RWX Russell Coker
2010-07-12 11:01 ` Török Edwin
2010-07-12 11:48   ` Eric Paris
2010-07-12 12:08     ` Russell Coker
2010-07-12 12:45       ` Török Edwin
2010-07-12 14:32         ` Martin Orr
2010-07-12 14:35           ` Török Edwin
2010-07-29 11:42             ` Martin Orr
2010-07-12 12:55     ` Török Edwin
2010-07-12 16:31       ` Stephen Smalley
2010-07-12 18:08         ` Török Edwin
2010-07-12 20:26           ` Stephen Smalley
2010-07-13  6:29             ` Török Edwin
2010-07-13  6:41               ` Russell Coker
2010-09-23 20:12                 ` Török Edwin
2010-07-13 15:26               ` Stephen Smalley
2010-07-12 21:32           ` Russell Coker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.