🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Bug#1153537: tcpdump: AppArmor profile blocks -z compression (.gz/.bz2) when rotating files

#3920
From: debugdeb26
Date: Mon, 09 Nov 2026 18:30
50 lines
5298 bytes
This is a multi-part message in MIME format.
--------------Ecs6qA073lUADrFZn1eTJeLc
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Package: tcpdump
Version: 4.99.5-2
Severity: normal
Tags: patch

When using 'tcpdump -z gzip' (or bzip2) to compress rotated capture 
files, the compression fails due to an AppArmor permission error.

While the AppArmor profile already contains the execution rights for the 
compressors via '/{usr/,}bin/gzip ixr,', it lacks the file permissions 
to write the resulting '.gz' or '.bz2' files. AppArmor blocks the write 
operation as soon as the suffix is appended to the original file name.

Extending the allowed file patterns with the choice syntax '{,.gz,.bz2}' 
fixes the issue for both standard and numbered suffixes (with -W).

I have attached a patch that resolves the issue by allowing read/write 
access to the compressed variants.

According to the package sources, the bug is still present in newer 
versions and the patch should apply unmodified.

Thank you
--------------Ecs6qA073lUADrFZn1eTJeLc
Content-Type: text/plain; charset=UTF-8;
 name="debian-tcpdump-apparmor-patch.txt"
Content-Disposition: attachment; filename="debian-tcpdump-apparmor-patch.txt"
Content-Transfer-Encoding: base64

LS0tIC9ldGMvYXBwYXJtb3IuZC91c3IuYmluLnRjcGR1bXAKKysrIC9ldGMvYXBwYXJtb3Iu
ZC91c3IuYmluLnRjcGR1bXAKQEAgLTUzLDEzICs1MywxMyBAQAogICBvd25lciBAe0hPTUV9
LyoqIHJ3LAogCiAgICMgZm9yIC1yLCAtRiBhbmQgLXcKLSAgLyoqLltwUF1bY0NdW2FBXVtw
UF0gcncsCi0gIC8qKi5bcFBdW2NDXVthQV1bcFBdW25OXVtnR10gcncsCi0gIC8qKi5bY0Nd
W2FBXVtwUF0gcncsCisgIC8qKi5bcFBdW2NDXVthQV1bcFBdeywuZ3osLmJ6Mn0gcncsCisg
IC8qKi5bcFBdW2NDXVthQV1bcFBdW25OXVtnR117LC5neiwuYnoyfSBydywKKyAgLyoqLltj
Q11bYUFdW3BQXXssLmd6LC5iejJ9IHJ3LAogICAjIC1XIGFkZHMgYSBudW1lcmljYWwgc3Vm
Zml4Ci0gIC8qKi5bcFBdW2NDXVthQV1bcFBdWzAtOV0qIHJ3LAotICAvKiouW3BQXVtjQ11b
YUFdW3BQXVtuTl1bZ0ddWzAtOV0qIHJ3LAotICAvKiouW2NDXVthQV1bcFBdWzAtOV0qIHJ3
LAorICAvKiouW3BQXVtjQ11bYUFdW3BQXVswLTldKnssLmd6LC5iejJ9IHJ3LAorICAvKiou
W3BQXVtjQ11bYUFdW3BQXVtuTl1bZ0ddWzAtOV0qeywuZ3osLmJ6Mn0gcncsCisgIC8qKi5b
Y0NdW2FBXVtwUF1bMC05XSp7LC5neiwuYnoyfSBydywKIAogICAjIGZvciBjb252ZW5pZW5j
ZSB3aXRoIC1yIChpZSwgcmVhZCBwY2FwIGZpbGVzIGZyb20gb3RoZXIgc291cmNlcykKICAg
L3Zhci9sb2cvc25vcnQvKmxvZyogciwK

--------------Ecs6qA073lUADrFZn1eTJeLc--
Technical Details
Message-ID: <NXChX-aRoN-1@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomod

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomod
From: debugdeb26@echteadresse.de
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1153537: tcpdump: AppArmor profile blocks -z compression (.gz/.bz2) when rotating files
Date: Mon, 09 Nov 2026 19:30:01 +0100
Message-ID: <NXChX-aRoN-1@gated-at.bofh.it>
X-Original-To: submit@bugs.debian.org
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Mon Nov  9 18:25:08 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.45
Reply-To: debugdeb26@echteadresse.de, 1153537@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: team+pkg-security@tracker.debian.org
X-Debian-Pr-Message: report 1153537
X-Debian-Pr-Package: tcpdump
X-Debian-Pr-Keywords: patch
X-Debian-Pr-Source: tcpdump
Arc-Seal: i=1; a=rsa-sha256; t=1794247801; cv=none;
    d=strato.com; s=strato-dkim-0002;
    b=emfAZVG+/jXjOgOa5e0NXp/GJ6y/MIWQbF5fKdk9foilq8j6Zx29/u+YOS/sub6zbt
    YfVkP6eAHWVxhtN0afqiep3qDHaPhr0U3myp05ZORQO0pr1JA4O0ZLKea5gW4aI8ZINH
    e5e9NKemAzrbP3jo/lTYGGDTf5QRT/d+EGp/pnA/q4QqeZmjg8aLSnFqZkliSUjabVqH
    1jzHEAFOyj+vQrMRqCxzcwMORAGflp/a3p8B0eaO1aXK7eb0quFw6WRMt74laV6wbwjw
    0HK2jT6lUKci4fL17i0bmx4Ji6K4gSZmyQqmbyHT3gkAFb+dywGyfdqggJu7scnHQqKZ
    m4xA==
Arc-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1794247801;
    s=strato-dkim-0002; d=strato.com;
    h=To:Subject:From:Date:Message-ID:Cc:Date:From:Subject:Sender;
    bh=WJfCXD5R086uslO3Tq9b6pX6W4NROUPZL4KqqDZ2t9Q=;
    b=jLw98NG6mKRIyC1FkE5dqQ5vXSDZBZ07555yJr9XoQzARb0JwwDQHggmy9a0YCBHq0
    DorGirZwse3G6BJ2VYkAxiRtEp7YRiFwtUb5DY+di9F9rKRiWUU/u+wRMWvBd5qgoQ7+
    Ru96R3g7eNmt3VILW5KD/6eRLGJNCBMBJkwbmMOeLZSNTKkB2lIAVsqUUcg9BAID8Cpr
    nYC4PGWWuYsLO3rsBWuXuQoIi81Pkods7u52tqsx8kuF9dbo/1yol/gLeupvWLgu78rh
    OYJJsbWpMTnP2gFuXME+IaeDE0IcRHBVABfy+Y6YGh6aq2GWfDpPB4rnTLYPjIc7VUBo
    vdFg==
Arc-Authentication-Results: i=1; strato.com;
    arc=none;
    dkim=none
X-Rzg-Class-ID: mo00
X-Rzg-Auth: ":O2kGeEG7b/pS1Ei6Q2u2iO0AgOcckODcJBjHUCQ9ozpwaRURo89w1tDYDvbuzEsl0MjUCDQJ0g=="
Content-Type: multipart/mixed; boundary="------------Ecs6qA073lUADrFZn1eTJeLc"
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Greylist: delayed 363 seconds by postgrey-1.37 at buxtehude; Mon, 09 Nov 2026 18:22:07 UTC
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2001700
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 50
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Mon, 9 Nov 2026 19:10:00 +0100
X-Original-Message-ID: <3dce4723-cabd-4663-9d81-6e507e713d9d@echteadresse.de>