Page MenuHomeFreeBSD

ktls: Add tests for receiving corrupted or invalid records.
ClosedPublic

Authored by jhb on Nov 12 2022, 12:03 AM.
Tags
None
Referenced Files
F98735332: D37373.diff
Fri, Oct 4, 1:22 PM
Unknown Object (File)
Sun, Sep 22, 7:19 AM
Unknown Object (File)
Sun, Sep 22, 2:23 AM
Unknown Object (File)
Sat, Sep 21, 5:07 PM
Unknown Object (File)
Wed, Sep 18, 6:44 PM
Unknown Object (File)
Wed, Sep 18, 5:07 AM
Unknown Object (File)
Wed, Sep 18, 2:19 AM
Unknown Object (File)
Mon, Sep 9, 6:47 AM
Subscribers

Details

Summary

These should all trigger errors when reading from the socket.

Tests include truncated records (socket closed early on the other
side), corrupted records (bits flipped in explicit IVs, ciphertext, or
MAC), invalid header fields, and various invalid record lengths.

Sponsored by: Chelsio Communications

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 48317
Build 45203: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Nov 12 2022, 12:03 AM
tests/sys/kern/ktls_test.c
1495

I think I ended up with this always being true (no callers pass 0).

1615

TOE TLS at least reports EBADMSG for these errors rather than EMSGSIZE.

markj added inline comments.
tests/sys/kern/ktls_test.c
682

Extra newline.

1534

Missing close_sockets() calls after each of the tests.

This revision is now accepted and ready to land.Nov 15 2022, 2:25 PM
jhb marked 2 inline comments as done.Nov 15 2022, 7:47 PM