Skip to content

32-bit AES hardening and the 32-bit Arm FIPS kernel module - #11413

Open
kaleb-himes wants to merge 11 commits into
wolfSSL:masterfrom
kaleb-himes:PQ-FS-2026-Part3-SecurityReview-nofallback-N
Open

kaleb-himes wants to merge 11 commits into
wolfSSL:masterfrom
kaleb-himes:PQ-FS-2026-Part3-SecurityReview-nofallback-N

Conversation

@kaleb-himes

@kaleb-himes kaleb-himes commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Description

Pairs with: https://github.com/wolfSSL/scripts/pull/679

Reminder to self, this is stacked on top of branch L, once L merges, resolve merge conflicts before N can merge. Keep self-assigned till L merge. L merged on Sep 30, N now ready for review.

32-bit AES hardening and the 32-bit Arm FIPS kernel module. The AES half keeps the 32-bit x86 AES-GCM assembly out of 32-bit builds (its text relocations cannot be covered by the integrity hash), carries an AES-CBC decrypt failure out through the vector-register pop, enforces the SP 800-38E data-unit limit per unit and on decrypt, zeroizes key-unwrap scratch and rejected CCM/GCM output on every exit, refuses AES-SIV and AES-EAX under FIPS v7, and gives every 32-bit Arm assembly call site a status. The kernel half makes libwolfssl.ko load and pass POST on 32-bit Arm: SIMD through the arm vector-register glue, claims around the arm32 SHA lanes, wolfSSL mutexes taking bottom halves off instead of interrupts on Arm, scalar SHA-2 and C SHA-3 so the system random source can hash from every context, and ARM-mode call and jump relocations plus the EABI division helpers inside the PIE container. Tested by boot on 6.6.99 and 6.1.62 with a per-context SHA-256/AES probe.

Testing

Emulated on both x86_64 already, working on standing up a spot-VM to emulate on real arm where we should be able to test performance better. Will update this note once those tests finish. No changes to asm this PR so no scripts/ counterpart.

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@kaleb-himes kaleb-himes self-assigned this Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

MemBrowse Memory Report

gcc-arm-cortex-m3

  • FLASH: .text +28 B (+0.0%, 129,161 B / 262,144 B, total: 49% used)

gcc-arm-cortex-m4

  • FLASH: .text +64 B (+0.0%, 207,916 B / 262,144 B, total: 79% used)

gcc-arm-cortex-m4-baremetal

  • FLASH: .text +64 B (+0.1%, 71,587 B / 262,144 B, total: 27% used)

gcc-arm-cortex-m4-crypto-only

  • FLASH: .text +64 B (+0.0%, 180,893 B / 262,144 B, total: 69% used)

gcc-arm-cortex-m4-dtls13

  • FLASH: .text +64 B (+0.0%, 192,324 B / 1,048,576 B, total: 18% used)

gcc-arm-cortex-m4-openssl-compat

  • FLASH: .text +64 B (+0.0%, 790,556 B / 1,048,576 B, total: 75% used)

gcc-arm-cortex-m4-pkcs7

  • FLASH: .text +64 B (+0.0%, 221,662 B / 262,144 B, total: 85% used)

gcc-arm-cortex-m4-rsa-only

  • FLASH: .text +64 B (+0.0%, 338,608 B / 1,048,576 B, total: 32% used)

gcc-arm-cortex-m7-pq

  • FLASH: .text +64 B (+0.0%, 309,232 B / 1,048,576 B, total: 29% used)

gcc-arm-cortex-m7-tls13

@kaleb-himes
kaleb-himes force-pushed the PQ-FS-2026-Part3-SecurityReview-nofallback-N branch 2 times, most recently from a4d9b4f to 48c93ed Compare September 9, 2026 22:06
@kaleb-himes kaleb-himes changed the title Pq fs 2026 part3 security review nofallback n 32-bit AES hardening and the 32-bit Arm FIPS kernel module Sep 9, 2026
@kaleb-himes
kaleb-himes force-pushed the PQ-FS-2026-Part3-SecurityReview-nofallback-N branch 2 times, most recently from 8978693 to fccb733 Compare September 10, 2026 01:44
@kaleb-himes

kaleb-himes commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor Author

retest this please.

@kaleb-himes
kaleb-himes force-pushed the PQ-FS-2026-Part3-SecurityReview-nofallback-N branch 3 times, most recently from 323c344 to 66369ec Compare September 11, 2026 19:22
@kaleb-himes

Copy link
Copy Markdown
Contributor Author

retest this please

wolfSSL-Fenrir-bot

This comment was marked as resolved.

wolfSSL-Fenrir-bot

This comment was marked as resolved.

@kaleb-himes
kaleb-himes force-pushed the PQ-FS-2026-Part3-SecurityReview-nofallback-N branch from d15e3c6 to d4dea79 Compare September 15, 2026 15:02
@kaleb-himes
kaleb-himes force-pushed the PQ-FS-2026-Part3-SecurityReview-nofallback-N branch from d4dea79 to 4451790 Compare September 24, 2026 23:38
@kaleb-himes kaleb-himes added the For FIPS v7 Module Related to FIPS v7.0.0 module prep for submission label Sep 29, 2026
Copilot AI balanced review requested due to automatic review settings September 30, 2026 18:22
@kaleb-himes
kaleb-himes force-pushed the PQ-FS-2026-Part3-SecurityReview-nofallback-N branch from 4451790 to f1a22db Compare September 30, 2026 18:22

This comment was marked as resolved.

@kaleb-himes
kaleb-himes dismissed wolfSSL-Fenrir-bot’s stale review October 1, 2026 11:09

Fenrir no longer available for reviews, dismissing now resolved review.

@kaleb-himes
kaleb-himes force-pushed the PQ-FS-2026-Part3-SecurityReview-nofallback-N branch 2 times, most recently from 58e5130 to 08dbaf6 Compare October 1, 2026 17:43
@kaleb-himes
kaleb-himes force-pushed the PQ-FS-2026-Part3-SecurityReview-nofallback-N branch from 06b6dce to c2d54df Compare October 2, 2026 22:30
@kaleb-himes
kaleb-himes requested a balanced review from Copilot October 3, 2026 10:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Architecture-specific cryptographic assembly, kernel SIMD state, and PIE relocation changes require final human review and native Arm validation.

Review effort: Balanced
Findings: None

Resolved since last review (2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For FIPS v7 Module Related to FIPS v7.0.0 module prep for submission

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants