]> git.ipfire.org Git - thirdparty/linux.git/commit
selftests: tls: add a test for splicing onto a full plaintext record
authorchanyoung <ppoo1220@gmail.com>
Tue, 4 Aug 2026 05:28:36 +0000 (14:28 +0900)
committerJakub Kicinski <kuba@kernel.org>
Thu, 6 Aug 2026 16:01:54 +0000 (09:01 -0700)
commit3834e079d67feda5fd57d1ea8d4185d316997335
treee3639de241ba3687653e6a725aa670d9b8e6909b
parent7bca91d63341274e857f4aeaad54d229405e93dc
selftests: tls: add a test for splicing onto a full plaintext record

Splicing onto a plaintext sk_msg ring that is already full used to wrap the
ring and make the kernel oops in the scatterwalk once the record was
pushed.

Only the copy path leaves the ring full without pushing it, so splice until
the ring is one fragment short, add the last fragment with a one-byte
MSG_MORE send, and splice once more before pushing the record.

CONFIG_MAX_SKB_FRAGS is 17..45, so that last fragment follows between 16
and 44 splices; sweep that range to trigger the bug on any build.

Signed-off-by: chanyoung <ppoo1220@gmail.com>
Link: https://patch.msgid.link/20260804052837.49015-3-ppoo1220@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/tls.c