freebsd-dev/tests/sys/kern
Mark Johnston 5de79eeddb ktls: Disallow transmitting empty frames outside of TLS 1.0/CBC mode
There was nothing preventing one from sending an empty fragment on an
arbitrary KTLS TX-enabled socket, but ktls_frame() asserts that this
could not happen.  Though the transmit path handles this case for TLS
1.0 with AES-CBC, we should be strict and allow empty fragments only in
modes where it is explicitly allowed.

Modify sosend_generic() to reject writes to a KTLS-enabled socket if the
number of data bytes is zero, so that userspace cannot trigger the
aforementioned assertion.

Add regression tests to exercise this case.

Reported by:	syzkaller
Reviewed by:	gallatin, jhb
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34195
2022-02-08 12:40:41 -05:00
..
acct
execve tests: add a basic test for argc == 0 2022-01-26 13:40:27 -06:00
pipe Do a sweep and remove most WARNS=6 settings 2020-10-01 01:10:51 +00:00
basic_signal.c Stop single stepping in signal handers on arm64 2022-02-07 15:03:23 +00:00
coredump_phnum_helper.c Fix coredump_phnum test with ASLR enabled by default 2021-11-21 12:57:38 -05:00
coredump_phnum_test.sh coredump_phnum_test: handle full file system gracefully 2019-10-11 21:23:46 +00:00
fdgrowtable_test.c fdgrowtable_test.c: appease gcc 2020-12-11 22:52:16 +00:00
kcov.c Allow the kcov buffer to be mmaped multiple times. 2019-02-21 10:11:15 +00:00
kern_copyin.c copyin tests: Use the KERN_PROC_VM_LAYOUT sysctl to fetch layout info 2022-01-17 16:12:43 -05:00
kern_descrip_test.c Fix problems in the kern_maxfiles__increase test 2019-10-08 13:43:05 +00:00
kill_zombie.c Add a test for kill() on a zombie 2019-08-06 21:17:22 +00:00
ktls_test.c ktls: Disallow transmitting empty frames outside of TLS 1.0/CBC mode 2022-02-08 12:40:41 -05:00
libkern_crc32.c tests/sys/kern/crc32: Check for SSE4.2 before using it 2021-02-02 09:53:39 +00:00
Makefile tests: Add some regression tests for a couple of KERN_PROC_* sysctls 2021-12-17 13:10:52 -05:00
Makefile.depend
Makefile.inc
pdeathsig_helper.c
pdeathsig.c sys.kern.pdeathsig.signal_delivered_ptrace: fix startup. 2019-08-19 09:33:09 +00:00
ptrace_test.c Add PT_GETREGSET 2022-01-27 11:40:34 +00:00
reaper.c
sendfile_helper.c add a few tests for sendfile. 2020-07-20 20:36:32 +00:00
sendfile_test.sh kyua/qemu: When running in qemu, don't teset sendfile 2022-02-02 14:27:51 -07:00
sigaltstack.c
sonewconn_overflow.py Clear the dmesg buffer to prevent rotating causes issues 2020-10-06 04:18:42 +00:00
sonewconn_overflow.sh Add a regression test for the changes in r359922 and r359923. 2020-04-16 20:07:34 +00:00
sys_getrandom.c
sysctl_kern_proc.c tests: Add some regression tests for a couple of KERN_PROC_* sysctls 2021-12-17 13:10:52 -05:00
unix_passfd_test.c Unbreak MSG_CMSG_CLOEXEC 2021-03-18 20:52:20 +00:00
unix_seqpacket_test.c
unix_socketpair_test.c Drop "All rights reserved" from the files I own 2019-03-11 22:23:56 +00:00
waitpid_nohang.c