clamd apparmor profile needs entry for havp

Bug #423669 reported by Imre Gergely
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
clamav (Ubuntu)
Fix Released
Medium
Unassigned
Jaunty
Fix Released
Medium
Scott Kitterman

Bug Description

Binary package hint: clamav

havp content scanner can use clamav to scan for viruses in downloaded files. It can use either libclamav or clamav daemon through socket. When the latter is selected havp fails to start and an entry is made in havp/error.log

TEST CASE:

1. install apparmor, clamav-daemon and havp
1a. usermod -a -G havp clamav (and restart clamav-daemon) !
2. configure havp to use clamav-daemon for scanning, edit /etc/havp/havp.config:
    ENABLECLAMLIB false
    ENABLECLAMD true
    CLAMDSOCKET /var/run/clamav/clamd.ctl
3. try (re)starting havp, it should not start, with the following message:

root@utest-jj:/etc/havp# /etc/init.d/havp start
Mounting /var/lib/havp/havp.loop under /var/spool/havp ...done
Cleaning up /var/spool/havp... done
Starting havp: Starting HAVP Version: 0.89
One or more scanners failed to initialize!
Check errorlog for errors.
Exiting..

4. check the logs for errors

/var/log/havp/error.log:
03/09/2009 14:32:24 === Starting HAVP Version: 0.89
03/09/2009 14:32:24 Running as user: havp, group: havp
03/09/2009 14:32:24 --- Initializing Clamd Socket Scanner
03/09/2009 14:32:24 ERROR: Clamd Socket Scanner failed EICAR virus test! (Access denied.)

/var/log/messages:
Sep 3 14:32:24 utest-jj kernel: [192255.269799] type=1503 audit(1251977544.838:15): operation="inode_permission" requested_mask="::r" denied_mask="::r" fsuid=110 name="/var/spool/havp/havp-iwGmjS" pid=6734 profile="/usr/sbin/clamd"

It means clamd doesn't have access to havp's temporary files to scan them.

5. regression potential is considered very low, as the only change was to make apparmor less restrictive

Revision history for this message
Imre Gergely (cemc) wrote :

Here's a possible solution for modifying clamd's apparmor profile.

Revision history for this message
Imre Gergely (cemc) wrote :

Tested on Jaunty with clamav and it's working, havp starts up and can use clamd to scan for viruses.

Changed in clamav (Ubuntu):
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package clamav - 0.95.2+dfsg-4ubuntu3

---------------
clamav (0.95.2+dfsg-4ubuntu3) karmic; urgency=low

  * Fix clamd apparmor profile to work with havp (LP: #423669)
    - Thanks to Imre Gergely for the fix

 -- Scott Kitterman <email address hidden> Thu, 03 Sep 2009 14:16:19 -0400

Changed in clamav (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Scott Kitterman (kitterman) wrote :

Trivial apparmor profile update.

Changed in clamav (Ubuntu Jaunty):
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Scott Kitterman (kitterman) wrote :

Note: This is also fixed in the 0.95.2 backports for dapper/hardy/intrepid.

Changed in clamav (Ubuntu Jaunty):
status: In Progress → Fix Committed
Changed in clamav (Ubuntu):
importance: Undecided → Medium
Imre Gergely (cemc)
description: updated
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted clamav into jaunty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in clamav (Ubuntu Jaunty):
assignee: nobody → Scott Kitterman (kitterman)
tags: added: verification-needed
Revision history for this message
Imre Gergely (cemc) wrote :

Tested the package from -proposed with havp and it's working as expected.

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package clamav - 0.95.2+dfsg-4ubuntu1.2

---------------
clamav (0.95.2+dfsg-4ubuntu1.2) jaunty-proposed; urgency=low

  * Fix clamd apparmor profile to work with havp (LP: #423669)
    - Thanks to Imre Gergely for the fix

 -- Scott Kitterman <email address hidden> Thu, 03 Sep 2009 14:22:42 -0400

Changed in clamav (Ubuntu Jaunty):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.