linux-stable/net/tls
Sabrina Dubroca f310143961 tls: stop recv() if initial process_rx_list gave us non-DATA
[ Upstream commit fdfbaec592 ]

If we have a non-DATA record on the rx_list and another record of the
same type still on the queue, we will end up merging them:
 - process_rx_list copies the non-DATA record
 - we start the loop and process the first available record since it's
   of the same type
 - we break out of the loop since the record was not DATA

Just check the record type and jump to the end in case process_rx_list
did some work.

Fixes: 692d7b5d1f ("tls: Fix recvmsg() to be able to peek across multiple records")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Link: https://lore.kernel.org/r/bd31449e43bd4b6ff546f5c51cf958c31c511deb.1708007371.git.sd@queasysnail.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-01 13:13:37 +01:00
..
Kconfig
Makefile
tls_device.c net/tls: Fix race in TLS device down flow 2022-07-29 17:14:12 +02:00
tls_device_fallback.c net: Use skb_frag_off accessors 2019-07-30 14:21:32 -07:00
tls_main.c net: tls: fix possible race condition between do_tls_getsockopt_conf() and do_tls_setsockopt_conf() 2023-04-05 11:16:36 +02:00
tls_sw.c tls: stop recv() if initial process_rx_list gave us non-DATA 2024-03-01 13:13:37 +01:00