android_kernel_sony_sdm845/net/llc
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Eric Biggers 4a7005d252 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: 1da177e4c3 ("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-01-29 10:24:33 +01:00
..
af_llc.c llc: fix another potential sk_buff leak in llc_ui_sendmsg() 2020-01-29 10:24:33 +01:00
Kconfig
llc_c_ac.c llc: fix sk_buff leak in llc_conn_service() 2019-11-06 12:18:24 +01:00
llc_c_ev.c
llc_c_st.c llc: Make llc_conn_ev_qfyr_t function pointer arrays const 2014-12-10 15:21:24 -05:00
llc_conn.c llc: fix sk_buff refcounting in llc_conn_state_process() 2020-01-29 10:24:33 +01:00
llc_core.c llc: avoid blocking in llc_sap_close() 2019-11-25 09:52:18 +01:00
llc_if.c llc: fix another potential sk_buff leak in llc_ui_sendmsg() 2020-01-29 10:24:33 +01:00
llc_input.c llc: Fix races between llc2 handler use and (un)registration 2012-08-14 16:52:02 -07:00
llc_output.c llc: fix skb leak in llc_build_and_send_ui_pkt() 2019-06-11 12:22:33 +02:00
llc_pdu.c
llc_proc.c sock: tigthen lockdep checks for sock_owned_by_user 2016-04-13 22:37:20 -04:00
llc_s_ac.c llc: fix sk_buff leak in llc_sap_state_process() 2019-11-06 12:18:23 +01:00
llc_s_ev.c
llc_s_st.c llc: Make llc_sap_action_t function pointer arrays const 2014-12-10 15:21:24 -05:00
llc_sap.c llc: fix sk_buff leak in llc_sap_state_process() 2019-11-06 12:18:23 +01:00
llc_station.c llc2: Fix return statement of llc_stat_ev_rx_null_dsap_xid_c (and _test_c) 2020-01-12 11:24:25 +01:00
Makefile
sysctl_net_llc.c net: llc: use correct size for sysctl timeout entries 2015-01-25 00:23:21 -08:00