#1152371 oscar: unregistered vendor copy of botan

Package:
src:oscar
Source:
src:oscar
Submitter:
Helmut Grohne
Date:
2026-11-08 03:57:01 UTC
Severity:
normal
Tags:
#1152371#5
Date:
2026-10-27 20:01:50 UTC
From:
To:
oscar builds a vendor copy of botan. This is problematic on several
levels. The Debian policy discourages embedded code copies and this
makes it a normal bug. A vulnerability in botan (which is a crypto
library after all) has to be fixed several times. Worse, one has to
figure out which packages include such a copy. Therefore, we keep a
record at
https://salsa.debian.org/security-tracker-team/security-tracker/-/blob/master/data/embedded-code-copies.
Notably, oscar is not listed here. The botan version included in oscar
is very old. It is very likely affected by a number of vulnerabilities
fixed in newer versions, see
https://security-tracker.debian.org/tracker/source-package/botan.
Beyond this, I attempted to cross build oscar and found that when
building it for s390x, it would fail with "error: writing 1 byte into a
region of size 0 [-Werror=stringop-overflow=]".  This likely is due to
compiling with -Werror and gcc-16 having gained precision in warnings
(or false positives). I cannot reproduce this on amd64.

This bug report is about the unregistered and vulnerable vendor copy.
Please decide whether oscar has a good reason to vendor botan. If it
does, register your vendor copy with the security tracker and fix all
vulnerabilities (e.g. by updating the copy) and close this bug. If it
does not, please reuse the system copy.

Helmut

#1152371#10
Date:
2026-10-30 00:52:40 UTC
From:
To:
Control: forwarded -1 https://gitlab.com/Seeker4/OSCAR-code/-/work_items/360

Thank you for the heads up.

I noticed that botan has been removed from the archive and is only
available on stable, so it seems like replacing it with the system copy
isn't feasible for unstable.

I've just filed an upstream issue letting them know about the situation
with botan; let's see how it goes.

Do you want to file another bug for this?

I believe the reason for OSCAR to vendor botan is the fact that botan
isn't available in Debian unstable/testing anymore.  I will wait for
upstream's reply to the issue before I decide what to do here.

Thanks again,

#1152371#17
Date:
2026-10-30 05:58:04 UTC
From:
To:
Hi Sergio,

botan issued a major version a while ago. The botan source package
remained with 2.x while a new source package botan3 provided the new
version. It is only the 2.x series that has been removed from unstable.

Likely switching to botan3 involves some porting effort, but at this
time I expect 3.x to have stabilized. I don't think anyone is doing
security support for 2.x anymore.

Thank you!

I see two possible subproblems here. One is compilation using -Werror.
As Debian packages newer compilers, -Werror is very likely to cause
frequent FTBFS. We are seeing this in other packages already. Therefore,
-Werror (as well as running shellcheck during build) is something that I
and others discourage. This is not trying to devalue these tools. In
your own CI, they are very valuable. For instance, your salsa-ci builds
may export DEB_CFLAGS_APPEND=-Werror so you get to see those problems
sooner while not having the urgency to fix them right away. Whether this
is a bug is in the eye of the beholder. Some maintainers vehemently
disagree with turning off -Werror by default. Do you see it as a bug?

The other aspect is that this happens while building botan 2.x. I don't
think it makes much sense to invest into the particular problem as it
has become clear that this code is being changed.

I checked older versions and didn't find any that actually dependend on
botan. Could it be that it rather is a convenience copy? It also looks
like oscar only uses a small fraction of botan.

From a process point of view, I'd like to get this bug out of the RC
state asap. I'm not sure how to get there though. A relatively time
intensive option is evaluating applicability of botan vulnerabilities
against oscar (hopefully figuring that none of them apply), recording
the embedding (against botan3 even though the 2.x version is used) and
downgrading it beyond rc. Another time intensive option is porting oscar
to botan3 (and also recording the embedding unless it can be
unvendored). The latter has more unknowns but likely is the better
long-term investment.

Regarding unembedding, I can already tell that it is not trivial as
oscar uses an amalgamation. At the very least #include directives change
a lot when using a system copy. Also consider whether upstream may want
to keep the embedding as a convenience for non-Debian users that wish to
avoid building a separate botan. Possibly, supporting both a vendored
and a system botan will be necessary.

I wish it was easier.

Helmut

#1152371#22
Date:
2026-11-02 02:34:34 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
oscar, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1152371@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sergio Durigan Junior <sergiodj@debian.org> (supplier of updated oscar package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sun, 01 Nov 2026 21:26:35 -0500
Source: oscar
Architecture: source
Version: 2.1.0-3~exp1
Distribution: experimental
Urgency: medium
Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
Changed-By: Sergio Durigan Junior <sergiodj@debian.org>
Closes: 1152371
Changes:
 oscar (2.1.0-3~exp1) experimental; urgency=medium
 .
   * d/p/0004-Link-against-botan3.patch: Link against system botan3.
     Needed because upstream ships an outdated version of botan which isn't
     receiving security updates anymore. (Closes: #1152371)
   * d/control: B-D on libbotan-3-dev.
Checksums-Sha1:
 4c5449244dea751ba0811cb6f7cae7f2f3a75c2d 2158 oscar_2.1.0-3~exp1.dsc
 087b4df8a414a78a353b3ec93a9821b5b772a26c 8336 oscar_2.1.0-3~exp1.debian.tar.xz
 1e7d7da8dc4d203f0405f63213ab8672c096fccc 7289 oscar_2.1.0-3~exp1_source.buildinfo
Checksums-Sha256:
 805340d60e3bd70d6e60f49b40a921ba41a9c831933350354ce07c5e5911cd12 2158 oscar_2.1.0-3~exp1.dsc
 aa0a3b805cc84dcdc6e805dfc950c61761cce3ad826e9d73579bcc09ff83c755 8336 oscar_2.1.0-3~exp1.debian.tar.xz
 3a57c037b1db6cc57454b85dd5647c777c851dd520406d4dec1ff7562e2a5d9f 7289 oscar_2.1.0-3~exp1_source.buildinfo
Files:
 1ecb516d36b988431381fadf75d31f4e 2158 science optional oscar_2.1.0-3~exp1.dsc
 2d1f51c1561549ecd6d169613a79a5e8 8336 science optional oscar_2.1.0-3~exp1.debian.tar.xz
 56c9807707971bf4c280ac13626e7f5b 7289 science optional oscar_2.1.0-3~exp1_source.buildinfo
-----BEGIN PGP SIGNATURE-----

wsG7BAEBCgBvBYJq5/UcCRDQ63YoZfxeNkcUAAAAAAAeACBzYWx0QG5vdGF0aW9u
cy5zZXF1b2lhLXBncC5vcmcNleZbEkwxbY+YXrZG6MUzcHs313R8rZJcg6+905CL
NRYhBCN6VLEChyi/AO8x9NDrdihl/F42AAC8bRAAg5JfS9s74QgunEBZcNwK75bd
6OmCn2XVJgj6d9L9a1FRQJqfrYNmOCJzsFdqD9T/Jgr+iYkOcfL7R9tCTj0bY05t
bLbmh593Fkj8lWmciPHiJAQhL3G3Enik4xjqAyIOv6LEuwj+v0c5fFPmpo8UhBKG
gYXVMB7PqNqEoyDN57NtEPOErE4NK6FCY78ZJqSHCUVa2D2g4Z5fqpEZ4Z/1BbXN
p3zptWj6HMQGMLdm77uO9XlhhSzj/XtA6TBWet7dn/kwRro9JCMK1SD790ivzRKP
aoqKwfasCCRwVWueMxNEkWY3sbSK9Hi1pKYdBdnN6wlUOdhLjbiNpJ6BkTFq7JTe
bbST+CvCxbTPbbGjucCqkHGFkGE6WFpwnlq8pC64PPKY1oh5UG+VeNZvhnvR7eWk
8Ve9genqTZ2bkRgVdEX5gBIESzjD+4/f0QFbzhVDbaiKa/cAW3aatsYppzFSOFHb
B03yaGxVKWUjQQq5TPP+MhOL7aW996D1efS+E8hbbb+pEWeZRcM3gF75deTepJ/I
mCEbMWNTppKqcDQefdKefkhKjMMrgR5nRXpWNuS580+Mkq/ur262PC6iVcrwaxaW
ocuMIyHQmfMpYCjRnnggpVagf/yBc19yXytbGL/Vjkx1Yt41uXa5pcs4tcnwLcLs
9n/UHHEAO+lFXy0VX3Y=
=w8HN
-----END PGP SIGNATURE-----

#1152371#27
Date:
2026-11-02 02:31:27 UTC
From:
To:
Control: tags -1 pending

Hi Helmut,

Oh, you're right.  I don't know I missed that.

Fair enough.  I will leave a comment on the upstream issue with this
update.

I don't vehemently disagree with you, but if upstream chose to keep
-Werror in the release then I tend to follow their lead here.  For
example, OSCAR has this snippet in their .pro file:


Ah, right.  I thought this was a problem with OSCAR itself.  In this
case, let's keep things in this bug.

So, I have very limited time for Debian these days (baby reasons), but I
was able to sit down for some minutes and adjust OSCAR to use botan3.
It wasn't as hard as I was thinking, although TBH I haven't checked if
upstream is patching their amalgamation of botan (I don't think so).

I've just uploaded the package to experimental; feel free to take a look
at the patch and let me know.  I will probably give it a week before
uploading to unstable, unless upstream agrees with my changes.

Oh, I haven't unvendored the existing botan either.  We can do that
later.

Cheers,

#1152371#34
Date:
2026-11-02 11:04:51 UTC
From:
To:
Hi Sergio,

To me, that's precisely the problem. Keeping -Werror in your CI allows
you to go through the trouble of handling those FTBFSes. Enabling it in
the package makes *others* go through that trouble.

No idea what's different between the cross build and the native one, but
we agree on not spending further effort here:

I spent a brief look and it mostly looks fine. In principle, this could
be upstreamable if changing two more aspects. I guess upstream would
want to keep the vendor copy, so adding a conditional for selecting the
vendored vs system one would likely be required. The other aspect is
using pkg-config to discover the flags for botan. Maybe you can try this
snippet?

    CONFIG += link_pkgconfig
    PKGCONFIG += botan-3

I don't think there is much point in repacking the source to remove the
vendored botan so long as it is distributable (and it is). The problem
to solve here is not copying vulnerabilities and that is achieved by
linking the system version. To me, your experimental upload fully
addresses the reported problem.

How about also looking at bookworm and trixie?  Unvendoring botan there
probably is not appropriate. But maybe updating the
debian-security-support package to call oscar unsupported in those
releases would be worthwhile?

See for example
https://sources.debian.org/src/debian-security-support/1%3A14%2B2026.05.07/security-support.deb13

Helmut

#1152371#39
Date:
2026-11-08 03:04:45 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
oscar, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1152371@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sergio Durigan Junior <sergiodj@debian.org> (supplier of updated oscar package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sat, 07 Nov 2026 21:59:30 -0500
Source: oscar
Architecture: source
Version: 2.1.1+ds-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
Changed-By: Sergio Durigan Junior <sergiodj@debian.org>
Closes: 1152371
Changes:
 oscar (2.1.1+ds-1) unstable; urgency=medium
 .
   * d/p/0004-Link-against-botan3.patch: Use pkgconf.
     Thanks to Helmut Grohne <helmut@subdivi.de>
   * d/control: B-D on pkgconf.
   * d/copyright: Exclude botan files from origtar.
     Not needed anymore since we use the system botan now.
   * d/watch: Repack the tarball with +ds.
   * New upstream version 2.1.1+ds
   * d/p/*.patch: Refresh.
   * d/watch: Set Dversion-Mangle.
   * d/rules: Rename binary from OSCAR20 to OSCAR.
 .
 oscar (2.1.0-3~exp1) experimental; urgency=medium
 .
   * d/p/0004-Link-against-botan3.patch: Link against system botan3.
     Needed because upstream ships an outdated version of botan which isn't
     receiving security updates anymore. (Closes: #1152371)
   * d/control: B-D on libbotan-3-dev.
Checksums-Sha1:
 4f1280ed5ccb88a9f863c5cf230448e688c77ba8 2171 oscar_2.1.1+ds-1.dsc
 6bd8ff47d17eaa3cfb693ed076d0acec3eca9888 10107896 oscar_2.1.1+ds.orig.tar.xz
 d1748f22f41f154cc1f9f1b2b2bd69b09c213b8c 8216 oscar_2.1.1+ds-1.debian.tar.xz
 8370b8a8d73bd0f2dff9af175f62f718833165c6 7355 oscar_2.1.1+ds-1_source.buildinfo
Checksums-Sha256:
 801435ab01706e3dc60e3b7282e30e64fb2a91129e7771783b8091d956169aac 2171 oscar_2.1.1+ds-1.dsc
 350ae94ec02ef68b6e9805ff1307e084d2ad2ce994aa7625989eb1681d5dc9ef 10107896 oscar_2.1.1+ds.orig.tar.xz
 3f4126ea9792d958513bdd0284b39e5e7c43ad3bd6feeef263b88749e009ca08 8216 oscar_2.1.1+ds-1.debian.tar.xz
 7d8639ddc5da2d99b7522ab1fa96693559880d98881966b9b5224aac2afa93fd 7355 oscar_2.1.1+ds-1_source.buildinfo
Files:
 4b202888dc7d875564b762e7662d826f 2171 science optional oscar_2.1.1+ds-1.dsc
 b4bfd57a75870f6fcae1807146d59a8c 10107896 science optional oscar_2.1.1+ds.orig.tar.xz
 b7c315099d1bc2b987d5fec5f6be3da4 8216 science optional oscar_2.1.1+ds-1.debian.tar.xz
 584595ad570942c9682b7d1d4e603406 7355 science optional oscar_2.1.1+ds-1_source.buildinfo
-----BEGIN PGP SIGNATURE-----

wsG7BAEBCgBvBYJq7+XXCRDQ63YoZfxeNkcUAAAAAAAeACBzYWx0QG5vdGF0aW9u
cy5zZXF1b2lhLXBncC5vcmcBjrNZG5P3lWfHhVsLVibE9OzTmRgHnIpMZv1yP+R1
KhYhBCN6VLEChyi/AO8x9NDrdihl/F42AACG/RAAo5qD8jteFeJuKzSma5Xe+yF6
twc0mshaKxrp4jH266VtoK8DIpODp1lM6tPfz15Bk2TK9Yhx2qdomEibuOIn9xVz
YOdfAnmV+n6OWWDbeHkHu+06eF9XbZJY4Tm5JPpdb2aMqcCZaBDbXb90DfOzuUd/
LSeFvWWYuGCYb8ud0JnfHi9hG+hn7nAMOOv8atyuumCvlo1fQn54/gmc6TTGy6eE
Gm6qOw+ii1rNN7OjxassnPcI6fwEJSWBQHrbXQHhktWw+96V3e7ol/Oy99UbP3UK
LgT5xJZSIPuBZzzUky7hxTHXpnI0LZ5e/Z5KyR3oKn8buvrrQVS4XwcOMjIGWgcg
6juY4riQtc9QHH8MPxOCdGJl6vlVAz2zUfxtRXeoakPW0+uKA+soONCWMfQHulwk
vLh4uNftCoRjh7kXsvWLzgtN5rvdi/LboA6LRU2pMQR62Q0QbJ3w3qj9yD1fz8qN
wY45pxFbJMf36yU0b7XjaQJtZ/I4w/M0/J21mVm8eOc76dqKUVKZb0hFp+yKCJLo
RiRqUV9OmGDS6rPaTX5FgdXss8HHeM59FwW+HebwAnhlELzffm/aa8VoF6X1kiUd
tWza/5Y1BvJzGq1kZZV3e0UAzwJKa9/3X2G823SXB/b+6i+syf08VeVNrLKnrwcE
UIuhzBsnFxAAKNcEIZI=
=PO1o
-----END PGP SIGNATURE-----

#1152371#44
Date:
2026-11-08 03:40:12 UTC
From:
To:
Hi Helmut,

That's fair.  I'll put in my TODO list to disable -Werror in the next
upload.

Yes, that works, thanks.  I wondered what it would take to make the
build use the pkgconfig file, but honestly I didn't have more time to
investigate.

Upstream released version 2.1.1 in the meantime, so I packaged that and
took the opportunity to repack the tarball and remove the vendored
botan.  I've just uploaded the new package with the changes.

That's a good idea.  As I said in my previous message my Debian time is
pretty limited nowadays, so I don't know when I'll be able to get to
this.  Feel free to do it if you're in a hurry.

Thanks,