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)
Sat, Nov 29, 7:25 PM
Unknown Object (File)
Thu, Nov 27, 1:36 AM
Unknown Object (File)
Wed, Nov 26, 9:51 AM
Unknown Object (File)
Wed, Nov 26, 12:24 AM
Unknown Object (File)
Tue, Nov 25, 3:35 PM
Unknown Object (File)
Sun, Nov 23, 3:12 PM
Unknown Object (File)
Sun, Nov 23, 3:10 AM
Unknown Object (File)
Fri, Nov 21, 6:16 AM
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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #78291)

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 ↗(On Diff #78291)

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.