linux/net/llc
Eric Biggers 36453c8528 llc: fix sk_buff refcounting in llc_conn_state_process()
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>
2019-10-08 13:23:05 -07:00
..
af_llc.c llc: fix another potential sk_buff leak in llc_ui_sendmsg() 2019-10-08 13:23:05 -07:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
llc_c_ac.c llc: fix sk_buff leak in llc_conn_service() 2019-10-08 13:23:05 -07:00
llc_c_ev.c
llc_c_st.c
llc_conn.c llc: fix sk_buff refcounting in llc_conn_state_process() 2019-10-08 13:23:05 -07:00
llc_core.c llc: avoid blocking in llc_sap_close() 2018-09-13 09:04:58 -07:00
llc_if.c llc: fix another potential sk_buff leak in llc_ui_sendmsg() 2019-10-08 13:23:05 -07:00
llc_input.c
llc_output.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 281 2019-06-05 17:36:36 +02:00
llc_pdu.c
llc_proc.c
llc_s_ac.c llc: fix sk_buff leak in llc_sap_state_process() 2019-10-08 13:23:05 -07:00
llc_s_ev.c
llc_s_st.c
llc_sap.c llc: fix sk_buff leak in llc_sap_state_process() 2019-10-08 13:23:05 -07:00
llc_station.c
Makefile llc: fix whitespace issues 2018-07-24 14:10:42 -07:00
sysctl_net_llc.c