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)
Tue, Oct 14, 7:23 AM
Unknown Object (File)
Tue, Oct 14, 2:27 AM
Unknown Object (File)
Fri, Oct 3, 9:33 PM
Unknown Object (File)
Wed, Oct 1, 4:16 AM
Unknown Object (File)
Wed, Sep 17, 12:21 AM
Unknown Object (File)
Tue, Sep 16, 7:41 PM
Unknown Object (File)
Sep 6 2025, 4:06 AM
Unknown Object (File)
Aug 31 2025, 4:41 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

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.