android_kernel_samsung_a7y1.../net/llc
Eric Biggers 44e98a23be llc: fix sk_buff refcounting in llc_conn_state_process()
[ Upstream commit 36453c852816f19947ca482a595dffdd2efa4965 ]

If llc_conn_state_process() sees that llc_conn_service() put the skb on
a list, it will drop one fewer references to it.  This is wrong because
the current behavior is that llc_conn_service() never consumes a
reference to the skb.

The code also makes the number of skb references being dropped
conditional on which of ind_prim and cfm_prim are nonzero, yet neither
of these affects how many references are *acquired*.  So there is extra
code that tries to fix this up by sometimes taking another reference.

Remove the unnecessary/broken refcounting logic and instead just add an
skb_get() before the only two places where an extra reference is
actually consumed.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-07 13:43:36 +02:00
..
af_llc.c llc: fix another potential sk_buff leak in llc_ui_sendmsg() 2020-04-07 13:43:34 +02:00
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
llc_c_ac.c llc: fix sk_buff leak in llc_conn_service() 2020-04-07 09:28:32 +02:00
llc_c_ev.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
llc_c_st.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
llc_conn.c llc: fix sk_buff refcounting in llc_conn_state_process() 2020-04-07 13:43:36 +02:00
llc_core.c llc: avoid blocking in llc_sap_close() 2020-04-07 12:27:44 +02:00
llc_if.c llc: fix another potential sk_buff leak in llc_ui_sendmsg() 2020-04-07 13:43:34 +02:00
llc_input.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
llc_output.c llc: fix skb leak in llc_build_and_send_ui_pkt() 2020-04-06 18:20:39 +02:00
llc_pdu.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
llc_proc.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
llc_s_ac.c llc: fix sk_buff leak in llc_sap_state_process() 2020-04-07 09:28:30 +02:00
llc_s_ev.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
llc_s_st.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
llc_sap.c llc: fix sk_buff leak in llc_sap_state_process() 2020-04-07 09:28:30 +02:00
llc_station.c llc2: Fix return statement of llc_stat_ev_rx_null_dsap_xid_c (and _test_c) 2020-04-07 13:29:02 +02:00
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sysctl_net_llc.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30