5de79eeddb
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 |
||
---|---|---|
.. | ||
acct | ||
execve | ||
pipe | ||
basic_signal.c | ||
coredump_phnum_helper.c | ||
coredump_phnum_test.sh | ||
fdgrowtable_test.c | ||
kcov.c | ||
kern_copyin.c | ||
kern_descrip_test.c | ||
kill_zombie.c | ||
ktls_test.c | ||
libkern_crc32.c | ||
Makefile | ||
Makefile.depend | ||
Makefile.inc | ||
pdeathsig_helper.c | ||
pdeathsig.c | ||
ptrace_test.c | ||
reaper.c | ||
sendfile_helper.c | ||
sendfile_test.sh | ||
sigaltstack.c | ||
sonewconn_overflow.py | ||
sonewconn_overflow.sh | ||
sys_getrandom.c | ||
sysctl_kern_proc.c | ||
unix_passfd_test.c | ||
unix_seqpacket_test.c | ||
unix_socketpair_test.c | ||
waitpid_nohang.c |