🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Bug#1152244: apt: please re-enable the seccomp sandbox for acquire methods by default

#2336
From: Julian Andres Klode
Date: Tue, 27 Oct 2026 08:00
149 lines
9933 bytes
------3EC82L921NT6R35K4JRZ901XTSM060
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable



Am 27=2E Oktober 2026 05:36:06 MEZ schrieb zkmarc@proton=2Eme:
>Package: apt
>Version:=C2=A03=2E3=2E4
>Severity: wishlist
>
>Hello,
>
>I would like to work on re-enabling APT's seccomp sandbox for the
>acquire methods by default, and would like to know whether the team
>would welcome that before I start=2E
>
>Background, as I understand it:
>
>- The sandbox was added in 2017 (32bcbd73e) and turned off by
>=C2=A0 default in 1=2E6~rc1 (e688a4f48), closing LP: #1732030, #890489 an=
d
>=C2=A0 linuxdeploy#869=2E
>- The reported breakages were mostly allow-list gaps (getdents
>=C2=A0 through NSS modules such as libnss-libvirt, socket/connect in
>=C2=A0 store, pread64 on NFS/NIS), plus the x32 issue and environments
>=C2=A0 where the policy cannot load=2E
>- The allow-list is still maintained: da74672bc (2025, #1091351)
>=C2=A0 allowed directory reading in http for OpenSSL=2E
>
>Evidence that it works on common setups:
>
>- Wikimedia's puppet apt module sets APT::Sandbox::Seccomp "true"
>=C2=A0 (operations-puppet, modules/apt/manifests/init=2Epp); I found no
>=C2=A0 Allow/Trap entries anywhere in that repository=2E
>- Kicksecure has shipped the same setting since 2019
>=C2=A0 (security-misc, etc/apt/apt=2Econf=2Ed/40sandbox)=2E
>- On a current debian:sid arm64 container (2026-10-27), apt-get
>=C2=A0 update and install --download-only hello work with it enabled,
>=C2=A0 with no seccomp warnings=2E
>
>Still open:
>
>- #882588 (proxychains) and #888993 (fakeroot): LD_PRELOAD tools
>=C2=A0 that inject syscalls a fixed allow-list cannot predict=2E
>- #951718: seccomp overrides by syscall number=2E
>
>A rough plan, one merge request per step:
>
>1=2E Skip the sandbox with a notice when an LD_PRELOAD wrapper is
>=C2=A0 =C2=A0detected, the same way it is already skipped under qemu-user
>=C2=A0 =C2=A0(243acdee1)=2E
>2=2E Close the remaining known allow-list gaps and add overrides b
>=C2=A0 =C2=A0number (#951718)=2E
>3=2E Flip the default in unstable early in a release cycle, with a
>=C2=A0 =C2=A0NEWS entry and APT::Sandbox::Seccomp "false" as the way out=
=2E
>Questions:
>
>- Would you accept a default-on change if the above is done?
>- What else, beyond the bugs above, made you turn it off in 2018
>=C2=A0 that I should account for?

NSS modules fundamentally seem to make it impossible for the seccomp sandb=
ox to be enabled by default=2E

We do also need to have clear groups of what functionality to enable=2E We=
 should not be doing this at the syscall level really=2E Like either we all=
ow file I/O or we don't for example=2E This reduces the risk significantly=
=2E

>- Would you rather see Landlock for file access on top of seccom
>=C2=A0 pacman's downloader sandbox uses both=2E

A landlock branch is available=2E But it provides not much value if you th=
ink about it=2E The downloader code runs as an unprivileged user that can o=
nly write to that directory and more or less /tmp so what value do we get f=
rom adding a landlock policy with the same things=2E

Spending more time on these seems pointless as long as the verification of=
 hashes and signatures still happens within the sandbox=2E=20

I mean it's all nice but if you can execute code you can just place a craf=
ted =2Edeb there, pretend the hashes are fine and apt will go install it=2E=
=2E=2E

Sadly fixing this is verrrry hard=2E Well debs are easy but that still lea=
ves a hole for indices because they can get decompressed, recompressed and =
you need to have the right hashes for the final result=2E
------3EC82L921NT6R35K4JRZ901XTSM060
Content-Type: text/html;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html><html><body><div dir=3D"auto"><br><br>Am 27=2E Oktober 2026 =
05:36:06 MEZ schrieb zkmarc@proton=2Eme:<br>&gt;Package: apt<br>&gt;Version=
:=C2=A03=2E3=2E4<br>&gt;Severity: wishlist<br>&gt;<br>&gt;Hello,<br>&gt;<br=
>&gt;I would like to work on re-enabling APT's seccomp sandbox for the<br>&=
gt;acquire methods by default, and would like to know whether the team<br>&=
gt;would welcome that before I start=2E<br>&gt;<br>&gt;Background, as I und=
erstand it:<br>&gt;<br>&gt;- The sandbox was added in 2017 (32bcbd73e) and =
turned off by<br>&gt;=C2=A0 default in 1=2E6~rc1 (e688a4f48), closing LP: #=
1732030, #890489 and<br>&gt;=C2=A0 linuxdeploy#869=2E<br>&gt;- The reported=
 breakages were mostly allow-list gaps (getdents<br>&gt;=C2=A0 through NSS =
modules such as libnss-libvirt, socket/connect in<br>&gt;=C2=A0 store, prea=
d64 on NFS/NIS), plus the x32 issue and environments<br>&gt;=C2=A0 where th=
e policy cannot load=2E<br>&gt;- The allow-list is still maintained: da7467=
2bc (2025, #1091351)<br>&gt;=C2=A0 allowed directory reading in http for Op=
enSSL=2E<br>&gt;<br>&gt;Evidence that it works on common setups:<br>&gt;<br=
>&gt;- Wikimedia's puppet apt module sets APT::Sandbox::Seccomp "true"<br>&=
gt;=C2=A0 (operations-puppet, modules/apt/manifests/init=2Epp); I found no<=
br>&gt;=C2=A0 Allow/Trap entries anywhere in that repository=2E<br>&gt;- Ki=
cksecure has shipped the same setting since 2019<br>&gt;=C2=A0 (security-mi=
sc, etc/apt/apt=2Econf=2Ed/40sandbox)=2E<br>&gt;- On a current debian:sid a=
rm64 container (2026-10-27), apt-get<br>&gt;=C2=A0 update and install --dow=
nload-only hello work with it enabled,<br>&gt;=C2=A0 with no seccomp warnin=
gs=2E<br>&gt;<br>&gt;Still open:<br>&gt;<br>&gt;- #882588 (proxychains) and=
 #888993 (fakeroot): LD_PRELOAD tools<br>&gt;=C2=A0 that inject syscalls a =
fixed allow-list cannot predict=2E<br>&gt;- #951718: seccomp overrides by s=
yscall number=2E<br>&gt;<br>&gt;A rough plan, one merge request per step:<b=
r>&gt;<br>&gt;1=2E Skip the sandbox with a notice when an LD_PRELOAD wrappe=
r is<br>&gt;=C2=A0 =C2=A0detected, the same way it is already skipped under=
 qemu-user<br>&gt;=C2=A0 =C2=A0(243acdee1)=2E<br>&gt;2=2E Close the remaini=
ng known allow-list gaps and add overrides b<br>&gt;=C2=A0 =C2=A0number (#9=
51718)=2E<br>&gt;3=2E Flip the default in unstable early in a release cycle=
, with a<br>&gt;=C2=A0 =C2=A0NEWS entry and APT::Sandbox::Seccomp "false" a=
s the way out=2E<br>&gt;Questions:<br>&gt;<br>&gt;- Would you accept a defa=
ult-on change if the above is done?<br>&gt;- What else, beyond the bugs abo=
ve, made you turn it off in 2018<br>&gt;=C2=A0 that I should account for?<b=
r><br>NSS modules fundamentally seem to make it impossible for the seccomp =
sandbox to be enabled by default=2E<br><br>We do also need to have clear gr=
oups of what functionality to enable=2E We should not be doing this at the =
syscall level really=2E Like either we allow file I/O or we don't for examp=
le=2E This reduces the risk significantly=2E<br><br>&gt;- Would you rather =
see Landlock for file access on top of seccom<br>&gt;=C2=A0 pacman's downlo=
ader sandbox uses both=2E<br><br>A landlock branch is available=2E But it p=
rovides not much value if you think about it=2E The downloader code runs as=
 an unprivileged user that can only write to that directory and more or les=
s /tmp so what value do we get from adding a landlock policy with the same =
things=2E<br><br>Spending more time on these seems pointless as long as the=
 verification of hashes and signatures still happens within the sandbox=2E =
<br><br>I mean it's all nice but if you can execute code you can just place=
 a crafted =2Edeb there, pretend the hashes are fine and apt will go instal=
l it=2E=2E=2E<br><br>Sadly fixing this is verrrry hard=2E Well debs are eas=
y but that still leaves a hole for indices because they can get decompresse=
d, recompressed and you need to have the right hashes for the final result=
=2E</div></body></html>
------3EC82L921NT6R35K4JRZ901XTSM060--
Technical Details
Message-ID: <NSKg9-8apX-7@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!newsfeed.bofh.team!newsfeed.xs3.de!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
References: <NSH8B-88y8-1@gated-at.bofh.it> <NSH8B-88y8-1@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!newsfeed.bofh.team!newsfeed.xs3.de!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: Julian Andres Klode <jak@debian.org>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1152244: apt: please re-enable the seccomp sandbox for acquire methods by default
Date: Tue, 27 Oct 2026 09:00:01 +0100
Message-ID: <NSKg9-8apX-7@gated-at.bofh.it>
References: <NSH8B-88y8-1@gated-at.bofh.it> <NSH8B-88y8-1@gated-at.bofh.it>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Tue Oct 27 07:51:12 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.899
Reply-To: Julian Andres Klode <jak@debian.org>, 1152244@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: deity@lists.debian.org
X-Debian-Pr-Message: followup 1152244
X-Debian-Pr-Package: apt
X-Debian-Pr-Source: apt
User-Agent: Thunderbird for Android
MIME-Version: 1.0
Content-Type: multipart/alternative;
 boundary=----3EC82L921NT6R35K4JRZ901XTSM060
Content-Transfer-Encoding: 7bit
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/1999137
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 149
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Tue, 27 Oct 2026 08:48:26 +0100
X-Original-Message-ID: <FB9DA9B0-36F6-49D8-96CA-670DBC4D187D@debian.org>
X-Original-References: <wxG--sEKq29T6-ukv1eKiPaNvbKhk4BEStGQUi4BmVkD4yeH_KfV4m7q-vNeBL-0ixz3w9xOQBdsFWHB1WqPXwpSvSqfWTwGgsLuzwNH138=@proton.me> <wxG--sEKq29T6-ukv1eKiPaNvbKhk4BEStGQUi4BmVkD4yeH_KfV4m7q-vNeBL-0ixz3w9xOQBdsFWHB1WqPXwpSvSqfWTwGgsLuzwNH138=@proton.me>