linux/net
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
..
6lowpan
9p netfs: Fix the request's work item to not require a ref 2025-05-21 14:35:20 +02:00
802 net: 802: Remove unused p8022 code 2025-04-22 07:04:02 -07:00
8021q net: 802: Remove unused p8022 code 2025-04-22 07:04:02 -07:00
appletalk treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
atm treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
ax25 treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
batman-adv Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-05-15 11:28:30 -07:00
bluetooth Bluetooth: L2CAP: Fix not responding with L2CAP_CR_LE_ENCRYPTION 2025-05-30 13:29:42 -04:00
bpf selftests/bpf: Add test to access const void pointer argument in tracing program 2025-04-23 11:26:22 -07:00
bridge Networking changes for 6.16. 2025-05-28 15:24:36 -07:00
caif
can can: bcm: add missing rcu read protection for procfs content 2025-05-19 16:58:19 +02:00
ceph A small CephFS encryption-related fix and a dead code cleanup. 2025-04-25 15:51:28 -07:00
core bpf, sockmap: Fix psock incorrectly pointing to sk 2025-06-10 18:16:15 +02:00
dcb
devlink devlink: use DEVLINK_VAR_ATTR_TYPE_* instead of NLA_* in fmsg 2025-05-06 18:21:11 -07:00
dns_resolver
dsa net: dsa: tag_brcm: legacy: fix pskb_may_pull length 2025-05-30 19:20:18 -07:00
ethernet
ethtool net: Add support for providing the PTP hardware source in tsinfo 2025-05-22 15:32:00 +02:00
handshake
hsr net: hsr: sync hw addr of slave2 according to slave1 hw addr on PRP 2025-04-14 12:40:06 +01:00
ieee802154 net: core: Convert dev_set_mac_address() to struct sockaddr_storage 2025-05-27 08:25:43 +02:00
ife
ipv4 net: fix udp gso skb_segment after pull from frag_list 2025-06-02 12:41:33 +01:00
ipv6 seg6: Fix validation of nexthop addresses 2025-06-05 08:03:17 -07:00
iucv s390: Convert MACHINE_IS_[LPAR|VM|KVM], etc, machine_is_[lpar|vm|kvm]() 2025-03-04 17:18:07 +01:00
kcm
key xfrm: Migrate offload configuration 2025-04-17 11:00:03 +02:00
l2tp net: move misc netdev_lock flavors to a separate header 2025-03-08 09:06:50 -08:00
l3mdev net: fib_rules: Fix iif / oif matching on L3 master device 2025-04-15 17:54:56 -07:00
lapb treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
llc llc: fix data loss when reading from a socket in llc_ui_recvmsg() 2025-05-19 12:12:54 +01:00
mac80211 wifi: cfg80211/mac80211: correctly parse S1G beacon optional elements 2025-06-05 11:32:16 +02:00
mac802154
mctp net: mctp: use nlmsg_payload() for netlink message data extraction 2025-05-26 17:38:27 +02:00
mpls mpls: Use nlmsg_payload in mpls_valid_getroute_req 2025-04-15 08:28:54 -07:00
mptcp mptcp: Use nested-BH locking for hmac_storage 2025-05-15 15:23:31 +02:00
ncsi net: core: Convert dev_set_mac_address() to struct sockaddr_storage 2025-05-27 08:25:43 +02:00
netfilter netfilter: nf_nat: also check reverse tuple to obtain clashing entry 2025-06-05 10:50:05 +02:00
netlabel calipso: unlock rcu before returning -EAFNOSUPPORT 2025-06-05 08:03:38 -07:00
netlink netlink: fix policy dump for int with validation callback 2025-05-12 18:50:09 -07:00
netrom treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
nfc treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
nsh
openvswitch Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-05-28 10:11:15 +02:00
packet af_packet: move notifier's packet_dev_mc out of rcu critical section 2025-05-27 11:36:26 +02:00
phonet
psample
qrtr
rds replace strncpy with strscpy_pad 2025-05-26 22:28:44 +02:00
rfkill
rose treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
rxrpc rxrpc: Fix return from none_validate_challenge() 2025-05-29 12:03:21 +02:00
sched Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-05-28 10:11:15 +02:00
sctp sctp: mark sctp_do_peeloff static 2025-05-27 18:18:55 -07:00
shaper
smc smc: Fix lockdep false-positive for IPPROTO_SMC. 2025-04-11 14:14:26 -07:00
strparser strparser: Remove unused __strp_unpause 2025-05-05 16:48:12 -07:00
sunrpc NFS Clent Updates for Linux 6.16 2025-06-03 16:13:32 -07:00
switchdev net: switchdev: Convert blocking notification chain to a raw one 2025-03-11 11:30:28 +01:00
tipc net: tipc: fix refcount warning in tipc_aead_encrypt 2025-05-29 12:07:26 +02:00
tls bpf, ktls: Fix data corruption when using bpf_msg_pop_data() in ktls 2025-06-11 16:59:42 +02:00
unix Networking changes for 6.16. 2025-05-28 15:24:36 -07:00
vmw_vsock Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-05-28 10:11:15 +02:00
wireless wifi: cfg80211/mac80211: correctly parse S1G beacon optional elements 2025-06-05 11:32:16 +02:00
x25 treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
xdp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-05-22 09:42:41 -07:00
xfrm ipsec-next-2025-05-23 2025-05-26 18:32:48 +02:00
compat.c
devres.c
Kconfig net: Kconfig NET_DEVMEM selects GENERIC_ALLOCATOR 2025-05-27 17:31:42 -07:00
Kconfig.debug
Makefile net: Retire DCCP socket. 2025-04-11 18:58:10 -07:00
socket.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-03-26 09:32:10 -07:00
sysctl_net.c