-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
debian packages: new versions of apt report "Malformed OpenPGP message" #33400
Comments
I tried to make a standalone test program to reproduce this signature problem, but the results are confusing. It looks like my test program is sensitive to the go-crypto dependency:
But the demo site also failed, so this doesn't quite match the problem I saw above. Here's what I have (gist). It compares signature verification results for gpg and sequoia. It was run on debian trixie with the The ProtonMail build is able to be verified by both gpg and sequoia, and If that was the only problem, the demo site should have worked, because the demo site was built using the ProtonMail version. So maybe there's more to it? |
Oh, you're right, the main branch is using both versions. I saw the new one in go.mod and assumed that the old one was completely replaced. That makes more sense, then. The keybase fork of go-crypto is no longer maintained (repo is archived) and it generates malformed signatures. I suggest switching it. I don't know how well I can test this locally, but I'll poke at it. |
I managed to propose a PR: Use ProtonMail/go-crypto to replace keybase/go-crypto #33402 |
See also https://github.com/orgs/community/discussions/27607 for some additional discussion of this issue. |
I noticed (and the discussion linked above also notes) that this issue is intermittent. So I grabbed a random .deb package from the cache folder and ran this test loop: for SEQ in `seq -w 1 1000`; do
# delete package
curl -s --user test:testtest -X DELETE http://localhost:3000/api/v1/packages/test/debian/zip/3.0-14 || true
# upload package
curl -s --user test:testtest --upload-file zip_3.0-14_amd64.deb http://localhost:3000/api/packages/test/debian/pool/test/test/upload
# test signature
curl -s http://localhost:3000/api/packages/test/debian/dists/test/InRelease | sq packet dump
done 2>&1 | grep Malformed | wc -l It failed 542 times out of 1000. I patched It failed 0 times out of 1000. |
So I think we can mark #33402 as "fix this issue" now |
Fix go-gitea#33400 The keybase/go-crypto is no longer maintained and it generates malformed signatures, ProtonMail/go-crypto is the actively maintained fork.
Backport #33402 by wxiaoguang Fix #33400 --------- Co-authored-by: wxiaoguang <[email protected]>
Description
New versions of apt in debian testing (trixie) and debian unstable (sid) are unable to read package lists from a gitea debian package repo.
I uploaded an arm64 package to the demo site. I followed the instructions to add the repo to an arm64 machine running debian trixie (testing), but it reports an error:
This is not arm64-specific, it happens on x86-64 too. That just happens to be where I first saw the issue.
Apt recently switched to a new implementation of PGP, called Sequoia, for signature verification. It's written in rust and has stricter parsing. This is in the apt v2.9.19 changelog:
Debian has packaged several of Sequoia's command line tools, including
sqv
andsq
.sq
looks useful for getting more info from the parsing process. Here's what it thinks of gitea's generated signatures, and a main Debian mirror:(For reference, the files retrieved by
curl
are in this gist.)Debian testing (trixie) and unstable (sid) both include this change, and are unable to retrieve package lists from gitea. Stable (bookworm) is not affected.
Gitea Version
1.22.6, 1.23.1, 1.24.0+dev-217-g06ff9b6256
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
linux
How are you running Gitea?
docker
Database
PostgreSQL
The text was updated successfully, but these errors were encountered: