[From nobody Sun Jun 28 16:54:08 2026
Received: (at submit) by bugs.debian.org; 12 Jan 2025 18:17:19 +0000
X-Spam-Checker-Version: SpamAssassin 3.4.6-bugs.debian.org_2005_01_02
 (2021-04-09) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-19.1 required=4.0 tests=BAYES_00,
 BODY_INCLUDES_PACKAGE,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,
 DKIM_VALID_EF,FOURLA,FVGT_m_MULTI_ODD,HAS_PACKAGE,SPF_HELO_PASS,
 SPF_PASS,XMAILER_REPORTBUG autolearn=ham autolearn_force=no
 version=3.4.6-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 25; hammy, 150; neutral, 604; spammy,
 0. spammytokens: hammytokens:0.000-+--bookworm, 0.000-+--rw-r,
 0.000-+--H*x:12.0.0, 0.000-+--H*UA:12.0.0, 0.000-+--stable-security
Return-path: &lt;Ralf+Debian@Bergs.biz&gt;
Received: from vsvr.de ([2a01:4f8:160:636c::2]:51326)
 by buxtehude.debian.org with esmtps
 (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
 (Exim 4.94.2) (envelope-from &lt;Ralf+Debian@Bergs.biz&gt;)
 id 1tX2WU-00F7zg-Kv
 for submit@bugs.debian.org; Sun, 12 Jan 2025 18:17:19 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=bergs.biz; 
 s=osvr; h=Date:Message-ID:Subject:To:From;
 bh=FB7dv3cjyIShGwFQNOenEj+gaCqYcMbfP4lxYsUJjiY=; b=DCuU66MzS1rRShWj9i0exiuSDA
 gA8aLW1yzhWUmKZuNpzlht87e9IPCaUaJyR0URCRAcEx1hxrRjtWOkOwlF4WMhCuKrJ0JnC3P4xrI
 p8a/VqDeQ55g6ghJBkZm1io5j8Mx98H7+gJaeHpLL7AC1zu0ub0OMX/01hv0ohsQw3npYGcSFCXuT
 02lHgAPglPXXk63gAn9vARnGIaP19Vya0pQDCi8pXDKgRMrnsAXK21wnimF/xRzkP117HfGFZ2/5/
 dwYzSXxQNHdtO/njpi9LxOAR6FQUjEkIvv3gai44m/qotOKJogEtllP+gvLUQmvE83ERGDhNLBsEw
 3wpCeblg==;
Received: from rabe by vsvr.de with local (Exim 4.96)
 (envelope-from &lt;Ralf+Debian@Bergs.biz&gt;) id 1tX2BV-001rJu-2l;
 Sun, 12 Jan 2025 17:55:37 +0000
Content-Type: text/plain; charset=&quot;us-ascii&quot;
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Ralf Bergs &lt;Ralf+Debian@Bergs.biz&gt;
To: Debian Bug Tracking System &lt;submit@bugs.debian.org&gt;
Subject: /usr/sbin/clamd: apparmor config incomplete: doesn't allow process to
 read its own &quot;cgroup&quot; file
Message-ID: &lt;173670453784.428603.4999336300135393134.reportbug@vsvr.de&gt;
X-Mailer: reportbug 12.0.0
Date: Sun, 12 Jan 2025 17:55:37 +0000
X-Greylist: delayed 1295 seconds by postgrey-1.36 at buxtehude;
 Sun, 12 Jan 2025 18:17:18 UTC
Delivered-To: submit@bugs.debian.org

Package: clamav-daemon
Version: 1.0.7+dfsg-1~deb12u1
Severity: normal
File: /usr/sbin/clamd

Dear Maintainers,

I noticed in my logcheck emails the below warning from auditd:

kernel: [15870.808220] audit: type=1400 audit(1736697075.886:31):
apparmor=&quot;DENIED&quot; operation=&quot;open&quot; profile=&quot;/usr/sbin/clamd&quot;
name=&quot;/proc/1018/cgroup&quot; pid=1018 comm=&quot;clamd&quot; requested_mask=&quot;r&quot; denied_mask=&quot;r&quot; fsuid=112 ouid=0

If I understand this correctly, the factory apparmor profile denies
that clam daemon to read its own &quot;cgroup&quot; file.

I assume that a line as follows has to be added to
/etc/apparmor.d/usr.sbin.clamd:

	@{PROC}/[0-9]*/cgroup r,

I did it on my own machine, and it seems to have fixed the issue.

Many thanks in advance for looking into this issue.

Kind regards,

Ralf


-- Package-specific info:
--- configuration ---
Checking configuration files in /etc/clamav

Config file: clamd.conf
-----------------------
AlertExceedsMax disabled
PreludeEnable disabled
PreludeAnalyzerName = &quot;ClamAV&quot;
LogFile = &quot;/var/log/clamav/clamav.log&quot;
LogFileUnlock disabled
LogFileMaxSize = &quot;4294967295&quot;
LogTime = &quot;yes&quot;
LogClean disabled
LogSyslog disabled
LogFacility = &quot;LOG_LOCAL6&quot;
LogVerbose disabled
LogRotate = &quot;yes&quot;
ExtendedDetectionInfo = &quot;yes&quot;
PidFile disabled
TemporaryDirectory disabled
DatabaseDirectory = &quot;/var/lib/clamav&quot;
OfficialDatabaseOnly disabled
LocalSocket = &quot;/var/run/clamav/clamd.ctl&quot;
LocalSocketGroup = &quot;clamav&quot;
LocalSocketMode = &quot;666&quot;
FixStaleSocket = &quot;yes&quot;
TCPSocket disabled
TCPAddr disabled
MaxConnectionQueueLength = &quot;15&quot;
StreamMaxLength = &quot;26214400&quot;
StreamMinPort = &quot;1024&quot;
StreamMaxPort = &quot;2048&quot;
MaxThreads = &quot;12&quot;
ReadTimeout = &quot;180&quot;
CommandReadTimeout = &quot;30&quot;
SendBufTimeout = &quot;200&quot;
MaxQueue = &quot;100&quot;
IdleTimeout = &quot;30&quot;
ExcludePath disabled
MaxDirectoryRecursion = &quot;15&quot;
FollowDirectorySymlinks disabled
FollowFileSymlinks disabled
CrossFilesystems = &quot;yes&quot;
SelfCheck = &quot;3600&quot;
ConcurrentDatabaseReload = &quot;yes&quot;
DisableCache disabled
VirusEvent disabled
ExitOnOOM disabled
AllowAllMatchScan = &quot;yes&quot;
Foreground disabled
Debug disabled
LeaveTemporaryFiles disabled
GenerateMetadataJson disabled
User = &quot;clamav&quot;
Bytecode = &quot;yes&quot;
BytecodeSecurity = &quot;TrustSigned&quot;
BytecodeTimeout = &quot;60000&quot;
BytecodeUnsigned disabled
BytecodeMode = &quot;Auto&quot;
DetectPUA disabled
ExcludePUA disabled
IncludePUA disabled
ScanPE = &quot;yes&quot;
ScanELF = &quot;yes&quot;
ScanMail = &quot;yes&quot;
ScanPartialMessages disabled
PhishingSignatures = &quot;yes&quot;
PhishingScanURLs = &quot;yes&quot;
HeuristicAlerts = &quot;yes&quot;
HeuristicScanPrecedence disabled
StructuredDataDetection disabled
StructuredMinCreditCardCount = &quot;3&quot;
StructuredMinSSNCount = &quot;3&quot;
StructuredSSNFormatNormal = &quot;yes&quot;
StructuredSSNFormatStripped disabled
ScanHTML = &quot;yes&quot;
ScanOLE2 = &quot;yes&quot;
AlertBrokenExecutables disabled
AlertBrokenMedia disabled
AlertEncrypted disabled
StructuredCCOnly disabled
AlertEncryptedArchive disabled
AlertEncryptedDoc disabled
AlertOLE2Macros disabled
AlertPhishingSSLMismatch disabled
AlertPhishingCloak disabled
AlertPartitionIntersection disabled
ScanPDF = &quot;yes&quot;
ScanSWF = &quot;yes&quot;
ScanXMLDOCS = &quot;yes&quot;
ScanHWP3 = &quot;yes&quot;
ScanArchive = &quot;yes&quot;
ForceToDisk disabled
MaxScanTime = &quot;120000&quot;
MaxScanSize = &quot;104857600&quot;
MaxFileSize = &quot;26214400&quot;
MaxRecursion = &quot;16&quot;
MaxFiles = &quot;10000&quot;
MaxEmbeddedPE = &quot;10485760&quot;
MaxHTMLNormalize = &quot;10485760&quot;
MaxHTMLNoTags = &quot;2097152&quot;
MaxScriptNormalize = &quot;5242880&quot;
MaxZipTypeRcg = &quot;1048576&quot;
MaxPartitions = &quot;50&quot;
MaxIconsPE = &quot;100&quot;
MaxRecHWP3 = &quot;16&quot;
PCREMatchLimit = &quot;10000&quot;
PCRERecMatchLimit = &quot;5000&quot;
PCREMaxFileSize = &quot;26214400&quot;
OnAccessMountPath disabled
OnAccessIncludePath disabled
OnAccessExcludePath disabled
OnAccessExcludeRootUID disabled
OnAccessExcludeUID disabled
OnAccessExcludeUname disabled
OnAccessMaxFileSize = &quot;5242880&quot;
OnAccessDisableDDD disabled
OnAccessPrevention disabled
OnAccessExtraScanning disabled
OnAccessCurlTimeout = &quot;5000&quot;
OnAccessMaxThreads = &quot;5&quot;
OnAccessRetryAttempts disabled
OnAccessDenyOnError disabled
DevACOnly disabled
DevACDepth disabled
DevPerformance disabled
DevLiblog disabled
DisableCertCheck disabled
AlgorithmicDetection = &quot;yes&quot;
BlockMax disabled
PhishingAlwaysBlockSSLMismatch disabled
PhishingAlwaysBlockCloak disabled
PartitionIntersection disabled
OLE2BlockMacros disabled
ArchiveBlockEncrypted disabled

Config file: freshclam.conf
---------------------------
LogFileMaxSize = &quot;4294967295&quot;
LogTime = &quot;yes&quot;
LogSyslog disabled
LogFacility = &quot;LOG_LOCAL6&quot;
LogVerbose disabled
LogRotate = &quot;yes&quot;
PidFile disabled
DatabaseDirectory = &quot;/var/lib/clamav&quot;
Foreground disabled
Debug disabled
UpdateLogFile = &quot;/var/log/clamav/freshclam.log&quot;
DatabaseOwner = &quot;clamav&quot;
Checks = &quot;24&quot;
DNSDatabaseInfo = &quot;current.cvd.clamav.net&quot;
DatabaseMirror = &quot;db.local.clamav.net&quot;, &quot;database.clamav.net&quot;
PrivateMirror disabled
MaxAttempts = &quot;5&quot;
ScriptedUpdates = &quot;yes&quot;
TestDatabases = &quot;yes&quot;
CompressLocalDatabase disabled
ExtraDatabase disabled
ExcludeDatabase disabled
DatabaseCustomURL disabled
HTTPProxyServer disabled
HTTPProxyPort disabled
HTTPProxyUsername disabled
HTTPProxyPassword disabled
HTTPUserAgent disabled
NotifyClamd = &quot;/etc/clamav/clamd.conf&quot;
OnUpdateExecute disabled
OnErrorExecute disabled
OnOutdatedExecute disabled
LocalIPAddress disabled
ConnectTimeout = &quot;30&quot;
ReceiveTimeout disabled
Bytecode = &quot;yes&quot;

clamav-milter.conf not found

Software settings
-----------------
Version: 1.0.7
Optional features supported: MEMPOOL AUTOIT_EA06 BZIP2 LIBXML2 PCRE2 ICONV JSON 

Database information
--------------------
Database directory: /var/lib/clamav
main.cvd: version 62, sigs: 6647427, built on Thu Sep 16 12:32:42 2021
bytecode.cld: version 335, sigs: 86, built on Tue Feb 27 15:37:24 2024
daily.cld: version 27516, sigs: 2071934, built on Sun Jan 12 09:37:06 2025
Total number of signatures: 8719447

Platform information
--------------------
uname: Linux 6.1.0-29-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.123-1 (2025-01-02) x86_64
OS: Linux, ARCH: x86_64, CPU: x86_64
Full OS version: Debian GNU/Linux 12 (bookworm)
zlib version: 1.2.13 (1.2.13), compile flags: a9
platform id: 0x0a21a7a708000000000c0200

Build information
-----------------
GNU C: 12.2.0 (12.2.0)
sizeof(void*) = 8
Engine flevel: 167, dconf: 167

--- data dir ---
total 368152
-rw-r--r-- 1 clamav clamav   1411072 Feb 27  2024 bytecode.cld
-rw-r--r-- 1 clamav clamav 205083136 Jan 12 10:01 daily.cld
-rw-r--r-- 1 clamav clamav        69 Jun 15  2023 freshclam.dat
-rw-r--r-- 1 clamav clamav 170479789 Jun 15  2023 main.cvd

-- System Information:
Debian Release: 12.9
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-29-amd64 (SMP w/12 CPU threads; PREEMPT)
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages clamav-daemon depends on:
ii  adduser                         3.134
ii  clamav-base                     1.0.7+dfsg-1~deb12u1
ii  clamav-freshclam [clamav-data]  1.0.7+dfsg-1~deb12u1
ii  debconf [debconf-2.0]           1.5.82
ii  dpkg                            1.21.22
ii  init-system-helpers             1.65.2
ii  libc6                           2.36-9+deb12u9
ii  libclamav11                     1.0.7+dfsg-1~deb12u1
ii  libcurl4                        7.88.1-10+deb12u8
ii  libncurses6                     6.4-4
ii  libsystemd0                     252.33-1~deb12u1
ii  libtinfo6                       6.4-4
ii  procps                          2:4.0.2-3
ii  ucf                             3.0043+nmu1+deb12u1
ii  zlib1g                          1:1.2.13.dfsg-1

Versions of packages clamav-daemon recommends:
pn  clamdscan  &lt;none&gt;

Versions of packages clamav-daemon suggests:
ii  apparmor      3.0.8-3
ii  clamav-docs   1.0.7+dfsg-1~deb12u1
pn  daemon        &lt;none&gt;
pn  libclamunrar  &lt;none&gt;

-- Configuration Files:
/etc/logcheck/ignore.d.paranoid/clamav-daemon [Errno 13] Permission denied: '/etc/logcheck/ignore.d.paranoid/clamav-daemon'
/etc/logcheck/ignore.d.server/clamav-daemon [Errno 13] Permission denied: '/etc/logcheck/ignore.d.server/clamav-daemon'

-- debconf information:
  clamav-daemon/ScanSWF: true
  clamav-daemon/TCPAddr: any
  clamav-daemon/AddGroups: Debian-exim
  clamav-daemon/LogFile: /var/log/clamav/clamav.log
  clamav-daemon/FixStaleSocket: true
  clamav-daemon/LocalSocket: /var/run/clamav/clamd.ctl
  clamav-daemon/Bytecode: true
  clamav-daemon/MaxConnectionQueueLength: 15
  clamav-daemon/DisableCertCheck: false
  clamav-daemon/TCPSocket: 3310
  clamav-daemon/ForceToDisk: false
  clamav-daemon/OnAccessMaxFileSize: 5M
  clamav-daemon/LogSyslog: false
  clamav-daemon/AllowAllMatchScan: true
  clamav-daemon/MaxThreads: 12
  clamav-daemon/FollowDirectorySymlinks: false
  clamav-daemon/MaxScriptNormalize: 5M
  clamav-daemon/SelfCheck: 3600
  clamav-daemon/MaxEmbeddedPE: 10M
  clamav-daemon/ReadTimeout: 180
  clamav-daemon/MaxDirectoryRecursion: 15
  clamav-daemon/LocalSocketGroup: clamav
  clamav-daemon/BytecodeSecurity: TrustSigned
  clamav-daemon/MaxHTMLNoTags: 2M
  clamav-daemon/ScanArchive: true
  clamav-daemon/MaxZipTypeRcg: 1M
  clamav-daemon/ScanMail: true
  clamav-daemon/BytecodeTimeout: 60000
  clamav-daemon/StreamMaxLength: 25
  clamav-daemon/FollowFileSymlinks: false
  clamav-daemon/MaxHTMLNormalize: 10M
  clamav-daemon/debconf: true
  clamav-daemon/LocalSocketMode: 666
  clamav-daemon/User: clamav
  clamav-daemon/LogTime: true
  clamav-daemon/TcpOrLocal: UNIX
  clamav-daemon/LogRotate: true
]