Page MenuHomeFreeBSD

Move per-operation data out of the csession structure.
ClosedPublic

Authored by jhb on Jan 16 2018, 12:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 12 2024, 8:41 AM
Unknown Object (File)
Jan 21 2024, 7:51 PM
Unknown Object (File)
Dec 20 2023, 7:06 AM
Unknown Object (File)
Dec 1 2023, 6:18 AM
Unknown Object (File)
Aug 2 2023, 10:06 AM
Unknown Object (File)
Jul 22 2023, 5:11 AM
Unknown Object (File)
Jul 15 2023, 4:35 PM
Unknown Object (File)
Jul 3 2023, 5:06 PM
Subscribers

Details

Summary

Create a struct cryptop_data which contains state needed for a single
symmetric crypto operation and move that state out of the session. This
closes a race with the CRYPTO_F_DONE flag that can result in use after
free.

PR: 218597

Test Plan
  • cryptocheck and cryptotest.py against cryptosoft0, ccr0, and aesni0.

Diff Detail

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

Event Timeline

kib added inline comments.
sys/opencrypto/cryptodev.c
1094 ↗(On Diff #38021)

What is the purpose of this locking ?

This revision is now accepted and ready to land.Jan 17 2018, 9:29 AM
sys/opencrypto/cryptodev.c
1094 ↗(On Diff #38021)

Just to avoid losing wakeups() with the loop at line 1050.

This revision was automatically updated to reflect the committed changes.