🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Bug#1151671: DSA 6572-1 may be ineffective for systems installed w/ d-i from https

#2727
From: Pascal Hambourg
Date: Fri, 30 Oct 2026 23:10
71 lines
5842 bytes
On 29/10/2026 at 23:26, Max Vozeler wrote:
> On Thu, Oct 29, 2026 at 08:32:31PM +0000, Steve McIntyre wrote:
>> On Thu, Oct 29, 2026 at 09:24:11PM +0100, Pascal Hambourg wrote:
> 
>>> Do you see any case where it might be complicated, inconvenient or impossible
>>> to preseed the copying of custom CA certificates ?
> 
> Yes. I tested without the copying code in bootstrap-base.postinst:
> 
> (a) an https mirror with a certificate signed by a CA included in
> ca-certificates. Install completed fine.
> 
> (b) an https mirror that needs a custom CA. This worked for
> install_base_system but failed in apt_update. It turns copying *is*
> required in this case and doing it in late_command is too late.

Yes, preseed/late_command is triggered way too late to copy custom 
certificates. It would require to trigger a command right after the 
bootstrap base installation, before using apt-install to download the 
kernel package and additional packages from the mirror.

>>> If yes, an option would be for bootstrap-base.postinst to not copy
>>> certificates which are provided by ca-certificates-udeb. I guess it would
>>> require to ship a list of these certificates or their hashes, either provided
>>> by ca-certificates-udeb or generated when building the d-i image.
>>
>> Couldn't we just copy those then clear them out as part of the
>> post-installation step? Wouldn't that be an easy fix?
> 
> How would we identify the certs to be cleared out though? This seems
> non-trivial and potentially error prone - or am I just not seeing the
> easy solution?

Maybe by comparing them with certificates installed by ca-certificates ?
I agree, this is non-trivial and error-prone. For example if the mirror 
has a ca-certificates version newer than the ca-certificates-udeb used 
in the installation image and a compromised certificate was removed from 
the newer version, then this certificate would not be removed from the 
target system, unless ca-certificates has a purging mechanism such as 
proposed in your merge request 18.

> What if we instead mirror what ca-certificates does and require any
> custom CA certificates to be in /usr/local/share/ca-certificates in the
> installer and then copy that into /target?
> 
> Getting the custom certificate into the installer already requires
> creating the hash symlink in /etc/ssl/certs manually for lack of openssl
> rehash / c_rehash:
> 
> d-i preseed/early_command string \
>      somehow_create /etc/ssl/certs/XXX.crt; \
>      ln -s /etc/ssl/certs/XXX.crt /etc/ssl/certs/HHHHHHHH.0;
> 
> Or building the hash symlink into the image itself along with the
> certificate. That would be no more difficult if we required the certs to
> be in /usr/local/share/ca-certificates:
> 
> d-i preseed/early_command string \
>      somehow_create /usr/local/share/ca-certificates/XXX.crt; \
>      ln -s /usr/local/share/ca-certificates/XXX.crt /etc/ssl/certs/HHHHHHHH.0;
> 
> Thoughts?
It looks like a good idea to me. Separating default and custom 
certificates would be cleaner and AFAICS without any added complexity 
into d-i nor for users.

Also, the copying could be made unconditional regardless of whether a 
https mirror was selected or preseeded: if custom certificates are 
present, it must be for a reason. It could be something like this:

<https://salsa.debian.org/pham/base-installer/-/commit/6854a72b0e77>
Technical Details
Message-ID: <NU3Tr-8TFI-1@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
References: <NR1XP-7chD-9@gated-at.bofh.it> <NR2hb-7cpY-1@gated-at.bofh.it> <NR2Kd-7cOh-7@gated-at.bofh.it> <NThON-8tOy-7@gated-at.bofh.it> <NTAHM-8E4r-7@gated-at.bofh.it> <NR8wh-7geS-1@gated-at.bofh.it> <NTEV3-8GjX-1@gated-at.bofh.it> <NR8wh-7geS-1@gated-at.bofh.it> <NTF4J-8Gnm-9@gated-at.bofh.it> <NTGWR-8HjI-1@gated-at.bofh.it> <NR8wh-7geS-1@gated-at.bofh.it> <NTGWR-8HjI-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!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: Pascal Hambourg <pascal@plouf.fr.eu.org>
Newsgroups: linux.debian.bugs.dist,linux.debian.maint.boot
Subject: Bug#1151671: DSA 6572-1 may be ineffective for systems installed w/ d-i from https
Date: Sat, 31 Oct 2026 00:10:01 +0100
Message-ID: <NU3Tr-8TFI-1@gated-at.bofh.it>
References: <NR1XP-7chD-9@gated-at.bofh.it> <NR2hb-7cpY-1@gated-at.bofh.it> <NR2Kd-7cOh-7@gated-at.bofh.it> <NThON-8tOy-7@gated-at.bofh.it> <NTAHM-8E4r-7@gated-at.bofh.it> <NR8wh-7geS-1@gated-at.bofh.it> <NTEV3-8GjX-1@gated-at.bofh.it> <NR8wh-7geS-1@gated-at.bofh.it> <NTF4J-8Gnm-9@gated-at.bofh.it> <NTGWR-8HjI-1@gated-at.bofh.it> <NR8wh-7geS-1@gated-at.bofh.it> <NTGWR-8HjI-1@gated-at.bofh.it>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Fri Oct 30 23:07:08 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.65
Reply-To: Pascal Hambourg <pascal@plouf.fr.eu.org>, 1151671@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: debian-boot@lists.debian.org
X-Debian-Pr-Message: followup 1151671
X-Debian-Pr-Package: debian-installer
X-Debian-Pr-Source: debian-installer
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: fr
Organization: Plouf !
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/1999845
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 71
Sender: robomod@news.nic.it
X-Original-Date: Sat, 31 Oct 2026 00:03:56 +0100
X-Original-Message-ID: <e1036617-3022-4583-92cf-70926cd4b8ab@plouf.fr.eu.org>
X-Original-References: <atobRTV0o-y-Hz7g@dp.vpn.hinterhof.net> <20261022143425.GA6571@mraw.org> <20261022150315.GB6571@mraw.org> <auJQQS61epHxZ4QJ@dp.vpn.hinterhof.net> <20261029155147.GA3481@mraw.org> <atp-HCgA7n5xKZmL@layer-acht.org> <fe925189-5868-4848-b282-fe1c8e075af6@plouf.fr.eu.org> <atp-HCgA7n5xKZmL@layer-acht.org> <20261029203231.GO1683859@tack.einval.com> <auPILqdU_H-bi2VJ@dp.vpn.hinterhof.net> <atp-HCgA7n5xKZmL@layer-acht.org> <auPILqdU_H-bi2VJ@dp.vpn.hinterhof.net>