opnsense-src/tests/sys/kern
John Baldwin 7aee9d6c6d ktls CBC decrypt: Only increment iovec index when an entry is used
If an mbuf in the chain was skipped because it only contained bytes
from the header, the iovec index ('i') was incremented even though the
entry was not populated.  Only increment 'i' when an iovec entry is
consumed.

Add a new type of KTLS receive test which writes a single TLS record
via two separate write(2) calls over a TCP_NODELAY socket to trigger
a split in the mbuf chain in the kernel.  Test various split locations
including after the "plain" TLS header (5 bytes), after the full TLS
header, in the middle of the data payload, just before the start of
the trailer, and in the middle of the trailer.  These tests are also
run against all supported ciphers, not just CBC.  The 'header' test
for CBC ciphersuites was able to trigger the bug.

Approved by:	so
Security:	FreeBSD-SA-26:46.ktls
Security:	CVE-2026-49423
Sponsored by:	Chelsio Communications
2026-06-30 23:16:53 +02:00
..
acct Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
execve Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
pipe Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
aslr.c imgact_elf: Clear no-ASLR and -WXORX flags earlier for setugid images 2026-06-10 08:45:22 +02:00
basic_signal.c Reenable basic_signal:trap_signal_test on i386 2022-08-25 12:09:00 +08:00
coredump_phnum_helper.c Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
coredump_phnum_test.sh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
fdgrowtable_test.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
jail_lookup_root.c tests: Add a regression test for commit 7587f6d484 2026-01-28 07:36:32 +01:00
kcov.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
kern_copyin.c Remove "All Rights Reserved" from FreeBSD Foundation copyrights 2024-08-06 15:39:53 -04:00
kern_descrip_test.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
kill_zombie.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
ktls_test.c ktls CBC decrypt: Only increment iovec index when an entry is used 2026-06-30 23:16:53 +02:00
ktrace_test.c ktrace tests: Add a test case for handling of exec+setuid binaries 2024-08-15 14:29:49 +00:00
libkern_crc32.c Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
Makefile unlinkat: Pass flags down to the work functions 2026-06-30 23:16:42 +02:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.inc Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
module_test.c module_test: Fix some assignments to errno intended to be tests. 2022-03-14 14:05:05 -07:00
pdeathsig.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
pdeathsig_helper.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
procdesc.c procdesc: Make sure to drain selinfo sleepers in procdesc_free() 2026-05-21 07:32:50 +02:00
ptrace_test.c ptrace: Fix validation of PT_SC_REMOTE arguments 2026-05-21 07:32:54 +02:00
reaper.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
resolve_beneath_test.c unlinkat: Pass flags down to the work functions 2026-06-30 23:16:42 +02:00
sched_affinity.c sched tests: Avoid underflow when maxcpuid == 0 2024-07-21 20:55:27 -04:00
sendfile_helper.c Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
sendfile_test.sh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
sigaltstack.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
sigsys.c tests/sigsys: initialize parameter passed to sysctlbyname() 2025-02-10 00:36:24 +08:00
sigwait.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
socket_accf.c tests/socket: add accept_filter(9) test 2022-08-08 14:10:18 -07:00
socket_msg_trunc.c socket tests: Build fix 2023-10-24 10:28:11 -04:00
socket_msg_waitall.c socket tests: Add a regression test for MSG_WAITALL 2023-09-27 08:33:24 -04:00
socket_splice.c SO_SPLICE tests: Fix a comment typo 2025-01-14 14:14:24 +00:00
sonewconn_overflow.py Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
sonewconn_overflow.sh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
subr_physmem_test.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
sys_getrandom.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
sysctl_kern_proc.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
tiocnotty.c tty: Avoid leaving dangling pointers in tty_drop_ctty() 2026-04-29 22:12:55 +02:00
tty_pts.c kern: pts: do not special case closed slave side 2024-01-30 11:11:24 -06:00
unix_dgram.c unix: Add support for atomically setting the socket mode 2024-12-03 01:03:26 +00:00
unix_passfd_dgram.c tests/unix_passfd: compile SOCK_STREAM and SOCK_DGRAM versions 2022-06-24 09:09:11 -07:00
unix_passfd_stream.c tests/unix_passfd: compile SOCK_STREAM and SOCK_DGRAM versions 2022-06-24 09:09:11 -07:00
unix_passfd_test.c unix/tests: Add a regression test for fd transfer across jails 2026-02-24 19:22:12 +01:00
unix_seqpacket_test.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
unix_socketpair_test.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
waitpid_nohang.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00