2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/net/tls
Jiayuan Chen 178f6a5c8c bpf, ktls: Fix data corruption when using bpf_msg_pop_data() in ktls
When sending plaintext data, we initially calculated the corresponding
ciphertext length. However, if we later reduced the plaintext data length
via socket policy, we failed to recalculate the ciphertext length.

This results in transmitting buffers containing uninitialized data during
ciphertext transmission.

This causes uninitialized bytes to be appended after a complete
"Application Data" packet, leading to errors on the receiving end when
parsing TLS record.

Fixes: d3b18ad31f ("tls: add bpf support to sk_msg handling")
Reported-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Jiayuan Chen <jiayuan.chen@linux.dev>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/bpf/20250609020910.397930-2-jiayuan.chen@linux.dev
2025-06-11 16:59:42 +02:00
..
Kconfig net: skbuff: generalize the skb->decrypted bit 2024-04-06 17:34:31 +01:00
Makefile tls: rx: async: hold onto the input skb 2022-07-18 11:24:11 +01:00
tls_device_fallback.c net/tls: use the new scatterwalk functions 2025-03-02 15:19:44 +08:00
tls_device.c tcp: move icsk_clean_acked to a better location 2025-03-24 09:55:18 -07:00
tls_main.c net: tls: explicitly disallow disconnect 2025-04-08 11:38:49 +02:00
tls_proc.c tls: add counters for rekey 2024-12-16 12:47:30 +00:00
tls_strp.c net/tls: fix kernel panic when alloc_page failed 2025-05-15 07:40:51 -07:00
tls_sw.c bpf, ktls: Fix data corruption when using bpf_msg_pop_data() in ktls 2025-06-11 16:59:42 +02:00
tls_toe.c tls: create an internal header 2022-07-08 18:38:45 -07:00
tls.h tls: implement rekey for TLS1.3 2024-12-16 12:47:29 +00:00
trace.c net/tls: add tracing for device/offload events 2019-10-05 16:29:00 -07:00
trace.h move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00