Page MenuHomeFreeBSD

Fix a couple of bugs for asym crypto introduced in r359374.
ClosedPublic

Authored by jhb on Oct 15 2020, 10:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 28, 11:30 PM
Unknown Object (File)
Sun, Oct 27, 9:31 AM
Unknown Object (File)
Sun, Oct 27, 9:12 AM
Unknown Object (File)
Oct 2 2024, 4:44 PM
Unknown Object (File)
Sep 18 2024, 6:13 AM
Unknown Object (File)
Sep 17 2024, 9:35 PM
Unknown Object (File)
Sep 12 2024, 3:43 PM
Unknown Object (File)
Sep 8 2024, 11:30 PM
Subscribers

Details

Summary
  • Check for null pointers in the crypto_drivers[] array when checking for empty slots in crypto_select_kdriver().
  • Handle the case where crypto_kdone() is invoked on a request where krq_cap is NULL due to not finding a matching driver.
Test Plan
  • run src/tools/tools/cryptokeytest, it panicked until these were fixed

Diff Detail

Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 34203
Build 31353: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Oct 15 2020, 10:03 PM
jhb created this revision.
markj added inline comments.
sys/opencrypto/crypto.c
1543

This can be one line.

This revision is now accepted and ready to land.Oct 16 2020, 1:44 PM
sys/opencrypto/crypto.c
1543

Yes, it is still split out as two lines in the similar function for symmetric drivers which is why I left it this way. I might do a followup to fix both functions though.