Repository navigation
Null key aes - #11811
Null key aes#11811night1rider wants to merge 3 commits into
Conversation
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11811
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfcrypt-port-bugs, wolfssl-src, wolfssl-bugs
Not reviewed (no scan target covers them): .github/ci-deps/packages-ubuntu-22.04-minimal.txt, .github/configs/multi-arch.json, .github/configs/os-check-linux.json, .github/configs/os-check-macos.json, .github/workflows/multi-arch.yml, doc/dox_comments/header_files/aes.h, tests/api/test_aes.h
Coverage: 4 of 6 in-scope changed file(s) opened by the reviewer; not opened: tests/api/test_aes.c, wolfssl/wolfcrypt/cryptocb.h
Fenrir result: Approved ✅
No new issues found in the changed files.
Advisory only — this automated result does not count as a GitHub approval.
Review tier: Lite
|
dfa02de to
7f7c25c
Compare
Covers a NULL key reaching the SetKey callback on each AES path.
Do the same in the ARM32 and PPC asm wc_AesSetKey.
7f7c25c to
c8e8682
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11811
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfcrypt-port-bugs, wolfssl-src, wolfssl-bugs
Not reviewed (no scan target covers them): .github/ci-deps/packages-ubuntu-22.04-minimal.txt, .github/configs/multi-arch.json, .github/configs/os-check-linux.json, .github/configs/os-check-macos.json, .github/workflows/multi-arch.yml, doc/dox_comments/header_files/aes.h, tests/api/test_aes.h
Coverage: 5 of 5 in-scope changed file(s) opened by the reviewer
Fenrir result: Approved ✅
No new issues found in the changed files.
Advisory only — this automated result does not count as a GitHub approval.
Review tier: Max
Lets a NULL AES key reach the SetKey crypto callback, so a device that holds the key itself can take it.
Software still returns BAD_FUNC_ARG for a NULL key, but only after the callback says CRYPTOCB_UNAVAILABLE (generic C, ARM32 asm, PPC asm).
Ports with no SetKey callback (STM32, LTC, ESP32, MMCAU, AF_ALG) now reject a NULL key up front.
The AES_SETKEY callback path still rejects a NULL key; this PR leaves it as is.
Test:
./configure --enable-aesctr --enable-aesccm --enable-cryptocb --enable-cryptocbutils=setkey,free CPPFLAGS=-DWOLF_CRYPTO_CB_FIND && make && ./tests/unit.test --api --group aesThe ARM32 and PPC64 versions run in CI as
armhf-armasm-setkey,armhf-armasm-aes-setkeyandppc64le-asm-aes.