🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #7189

Bug#987711: ClamAV freshclam cannot exec scripts defined by OnErrorExecute or OnUpdateExecute

#7189
From: edmund
Date: Wed, 02 Dec 2026 15:00
30 lines
3154 bytes
Confirmed still fully reproducible on clamav-freshclam 1.4.7 (unstable).

With OnErrorExecute pointing at a run-parts invocation in
/etc/clamav/onerrorexecute.d (same setup as the original report), the
current AppArmor profile (debian/usr.bin.freshclam) denies the whole
mechanism:

  apparmor="DENIED" operation="exec" ... name="/usr/bin/dash" ...
  apparmor="DENIED" operation="open" ... name="/etc/clamav/onerrorexecute.d/" ...

I tested the following addition to debian/usr.bin.freshclam, which
resolves it completely (verified via journalctl -k with zero denials,
while the hook actually ran and wrote its output):

  /usr/bin/dash rix,
  /usr/bin/run-parts rix,
  /etc/clamav/onerrorexecute.d/* rix,
  /etc/clamav/onupdateexecute.d/* rix,
  /etc/clamav/onerrorexecute.d/ r,
  /etc/clamav/onupdateexecute.d/ r,

(The existing profile only granted "mr" on the hook-dir file glob,
which allows reading a script's contents but not executing it, and
never granted any exec permission on dash/run-parts, nor read access
on the directory nodes themselves for listing.)

Whatever an individual hook script itself needs beyond this (logger,
mail, curl, etc.) is going to be site-specific, and should be
configured in /etc/apparmor.d/local/usr.bin.freshclam (just as any
other local override). 
Technical Details
Message-ID: <O5TYm-fyJX-11@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!srl.newsdeef.eu.MISMATCH!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
References: <C8MNX-2OU-7@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srl.newsdeef.eu.MISMATCH!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: edmund@proteamail.com
Newsgroups: linux.debian.bugs.dist
Subject: Bug#987711: ClamAV freshclam cannot exec scripts defined by OnErrorExecute or OnUpdateExecute
Date: Wed, 02 Dec 2026 16:00:02 +0100
Message-ID: <O5TYm-fyJX-11@gated-at.bofh.it>
References: <C8MNX-2OU-7@gated-at.bofh.it>
X-Original-To: 987711@bugs.debian.org
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Wed Dec  2 14:59:07 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.451
Reply-To: edmund@proteamail.com, 987711@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: pkg-clamav-devel@lists.alioth.debian.org
X-Debian-Pr-Message: followup 987711
X-Debian-Pr-Package: clamav-freshclam
X-Debian-Pr-Source: clamav
X-Dkim-Filter: PhoenixDKIM Filter v1.0.0 mail.proteamail.com via nbg-mx-proteamail-1 4jfgnx5mCsz2xd2
X-Dkim-Key-Compromise: NOTE REGARDING DKIM KEY COMPROMISE https://proteamail.com/dkim-rotate/README.txt https://proteamail.com/dkim-rotate/60/6085ec65b1af80e57983ddcee072a3cb.pem
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2006547
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 30
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Wed, 02 Dec 2026 16:56:51 +0200
X-Original-Message-ID: <144b32ed85be889a0cae4887adc76bd0@proteamail.com>
X-Original-References: <CAHMzBOkSbq9Oatg9bCHStbjp2FvwvBkp6_0AKEiMbiJh3o1zMw@mail.gmail.com>