linux-yocto/net/llc
Ilia Gavrilov 836024a6c8 llc: fix data loss when reading from a socket in llc_ui_recvmsg()
commit 239af1970b upstream.

For SOCK_STREAM sockets, if user buffer size (len) is less
than skb size (skb->len), the remaining data from skb
will be lost after calling kfree_skb().

To fix this, move the statement for partial reading
above skb deletion.

Found by InfoTeCS on behalf of Linux Verification Center (linuxtesting.org)

Fixes: 30a584d944 ("[LLX]: SOCK_DGRAM interface fixes")
Cc: stable@vger.kernel.org
Signed-off-by: Ilia Gavrilov <Ilia.Gavrilov@infotecs.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-06-04 14:40:21 +02:00
..
af_llc.c llc: fix data loss when reading from a socket in llc_ui_recvmsg() 2025-06-04 14:40:21 +02:00
Kconfig
llc_c_ac.c
llc_c_ev.c
llc_c_st.c
llc_conn.c
llc_core.c
llc_if.c
llc_input.c
llc_output.c
llc_pdu.c
llc_proc.c
llc_s_ac.c llc: do not use skb_get() before dev_queue_xmit() 2025-03-13 12:53:17 +01:00
llc_s_ev.c
llc_s_st.c
llc_sap.c
llc_station.c
Makefile
sysctl_net_llc.c