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)
Jun 1 2024, 3:02 AM
Unknown Object (File)
May 2 2024, 3:41 PM
Unknown Object (File)
May 2 2024, 3:41 PM
Unknown Object (File)
May 2 2024, 3:40 PM
Unknown Object (File)
May 2 2024, 3:40 PM
Unknown Object (File)
May 2 2024, 3:40 PM
Unknown Object (File)
May 2 2024, 12:51 PM
Unknown Object (File)
Feb 15 2024, 2:50 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.