Page MenuHomeFreeBSD

Don't allow KTLS specific socket options on listening sockets
ClosedPublic

Authored by tuexen on Jan 4 2021, 4:46 AM.

Details

Summary

When using KTLS specific socket options on a listening socket, the system might panic, since socket buffers are used.

Test Plan

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

tuexen requested review of this revision.Jan 4 2021, 4:46 AM
tuexen created this revision.
jhb added inline comments.
sys/kern/uipc_ktls.c
1022

style nit: Blank line before the block comment. I think it's also better if this is before the ktls_offload_enable_calls counter update.

1088

Same thoughts here.

This revision is now accepted and ready to land.Jan 8 2021, 8:12 PM
This revision now requires review to proceed.Jan 8 2021, 8:33 PM
sys/kern/uipc_ktls.c
1022

Fixed. Wasn't sure about doing the check before or after the ktls_offload_enable_calls counter update, since other error checking is done after it...

1088

Also fixed.

This revision is now accepted and ready to land.Jan 8 2021, 10:12 PM