AES-GCM tests failing with wycherproof in Fedora
評価
調査の方向性
Start by reproducing the failure with the wycheproof integration test on Fedora and SoftHSM 2.6.9 or 2.7.0; the report identifies test 311 as the likely trigger after test 310. Trace the failing AES-GCM invalid-input case through the SoftHSM code that handles its buffers and compare behavior with the passing Ubuntu CI run. Done means the assertion is resolved and the Wycheproof tests pass.
索引モデルが issue の本文から書いたものです。
説明
After trying to update rust-cryptoki in Fedora that got softhsm 2.7.0 I started getting some C++ assertions. They fail in one of the wycherproof test rust-cryptoki introduced in recent release:
test aes_gcm_message_wycheproof ... ok
...
✓ Test 310: Valid - Key: 256-bit, Nonce: 10, Tag: 16, AAD: 0, PT: 16
/usr/include/c++/16/bits/stl_vector.h:1253: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = unsigned char; _Alloc = SecureAllocator<unsigned char>; reference = unsigned char&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
error: test failed, to rerun pass `--test wycheproof`
The same is happening in Fedora 43 with softhsm 2.6.9 (but looks like it does not in upstream CI with Ubuntu):
✓ Test 310: Valid - Key: 256-bit, Nonce: 10, Tag: 16, AAD: 0, PT: 16
/usr/include/c++/15/bits/stl_vector.h:1263: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = unsigned char; _Alloc = SecureAllocator<unsigned char>; reference = unsigned char&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
I assume the failing input is the next test we are not getting output for (output from testsuite running against kryoptic):
✓ Test 311: Invalid (expected failure) - Key: 128-bit, Nonce: 0, Tag: 16, AAD: 0, PT: 0
I did not dive deeper into the softhsm code, but it sounds like some buffer overrun that should not be there ...
- 主要言語
- C++
- スター
- 1.1k
- フォーク
- 434
- 平均マージ
- 12日 14時間
- マージ済み PR(30日)
- 2
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
softhsm/SoftHSMv2 のほかの issue
-
C_DigestKey digests a sensitive EC private key's CKA_VALUE: no check that the object is a secret keyオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 54/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 56/100
softhsm/SoftHSMv2 の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
ROCm/rocm-systems#15475 ·
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
Sendspin/sendspin-cpp#257 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
pocoproject/poco#5664 ·
メンテナーはふだん 2 日以内に返信
-
community:good-first-issue kind:bug kind:test scope:control status:needs-triage vehicle:rover
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
PX4/PX4-Autopilot#29727 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信