• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

open-quantum-safe / liboqs / 29383698927
82%

Build:
DEFAULT BRANCH: main
Ran 15 Jul 2026 03:08AM UTC
Jobs 3
Files 2931
Run time 5min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Jul 2026 02:16AM UTC coverage: 82.337% (+0.003%) from 82.334%
29383698927

push

github

web-flow
Fix integer overflow in OQS_MEM_aligned_alloc size calculation (#2492)

Both the OpenSSL and fallback branches of OQS_MEM_aligned_alloc compute
size + offset with no overflow check before passing the result to the
underlying allocator. When size is near SIZE_MAX, this wraps to a small
value, so the allocator returns a real but far too small buffer while
the caller still treats the returned pointer as valid for the full
requested size. Add a guard before each allocation call that rejects
the request instead of letting the addition wrap.

Confirmed with ASan: before this change, an unaligned near-SIZE_MAX
size drives CRYPTO_malloc/malloc down to an 8-byte (OpenSSL branch) or
1-byte (fallback branch) allocation, and the pointer-alignment bookkeeping
inside OQS_MEM_aligned_alloc itself immediately writes past it
(heap-buffer-overflow at common.c:329 and common.c:386 respectively).
After the fix both cases return NULL cleanly.

Also adds the alignment/size validation that the fallback branch
already performs (power-of-two alignment >= sizeof(void*), size a
multiple of alignment) to the OpenSSL branch, which was missing it
entirely.

See GHSA-54w9-9rvw-3fg4 for the original report.

Signed-off-by: Vishnu Ajith <27vishnu07@gmail.com>

2 of 5 new or added lines in 1 file covered. (40.0%)

256 existing lines in 18 files now uncovered.

210550 of 255716 relevant lines covered (82.34%)

8051694.65 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
83.64
-1.21% src/common/common.c

Coverage Regressions

Lines Coverage ∆ File
64
0.0
-100.0% src/kem/bike/additional_r4/decode_avx2.c
63
0.91
-19.09% src/common/sha3/xkcp_low/KeccakP-1600times4/avx2/KeccakP-1600-times4-SIMD256.c
46
0.0
-100.0% src/kem/bike/additional_r4/gf2x_mul_avx2.c
44
0.0
-100.0% src/kem/bike/additional_r4/gf2x_ksqr_avx2.c
22
0.0
-100.0% src/kem/bike/additional_r4/sampling_avx2.c
2
66.67
-33.33% src/kem/bike/additional_r4/cpu_features.h
2
75.22
-1.77% src/kem/hqc/pqc-hqc_hqc-5_ref/vector.c
2
97.06
-2.94% src/kem/ml_kem/mlkem-native_ml-kem-768_aarch64/mlkem/src/sampling.c
2
73.72
-0.45% src/sig/ml_dsa/mldsa-native_ml-dsa-87_ref/mldsa/src/sign.c
1
96.72
-1.64% src/kem/classic_mceliece/pqclean_mceliece348864_clean/encrypt.c
1
75.22
-0.88% src/kem/hqc/pqc-hqc_hqc-3_ref/vector.c
1
95.73
-0.09% src/sig/falcon/pqclean_falcon-512_aarch64/keygen.c
1
95.55
-0.09% src/sig/falcon/pqclean_falcon-padded-512_clean/keygen.c
1
98.53
-1.47% src/sig/ml_dsa/mldsa-native_ml-dsa-65_aarch64/mldsa/src/packing.c
1
62.72
-0.22% src/sig/ml_dsa/mldsa-native_ml-dsa-65_aarch64/mldsa/src/sign.c
1
33.33
-4.17% src/sig/ml_dsa/mldsa-native_ml-dsa-87_aarch64/mldsa/src/rounding.h
1
95.65
-2.17% src/sig/uov/pqov_ov_Is_avx2/ov.c
1
98.7
-1.3% usr/lib/gcc/x86_64-linux-gnu/15/include/avx2intrin.h
Jobs
ID Job ID Ran Files Coverage
1 x64-generic - 29383698927.1 15 Jul 2026 03:26AM UTC 1304
85.5
GitHub Action Run
2 arm64-distbuild - 29383698927.2 15 Jul 2026 03:14AM UTC 1840
60.84
GitHub Action Run
3 x64-distbuild - 29383698927.3 15 Jul 2026 03:08AM UTC 2394
56.86
GitHub Action Run
Source Files on build 29383698927
  • Tree
  • List 2931
  • Changed 46
  • Source Changed 1
  • Coverage Changed 46
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #29383698927
  • 29885468 on github
  • Prev Build on main (#29353124580)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc