1
0
Fork 0
remarkable-linux/net/llc
Cong Wang 222e05e0a2 llc: use refcount_inc_not_zero() for llc_sap_find()
[ Upstream commit 0dcb82254d ]

llc_sap_put() decreases the refcnt before deleting sap
from the global list. Therefore, there is a chance
llc_sap_find() could find a sap with zero refcnt
in this global list.

Close this race condition by checking if refcnt is zero
or not in llc_sap_find(), if it is zero then it is being
removed so we can just treat it as gone.

Reported-by: <syzbot+278893f3f7803871f7ce@syzkaller.appspotmail.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-22 07:46:08 +02:00
..
Kconfig
Makefile
af_llc.c llc: better deal with too small mtu 2018-05-19 10:20:23 +02:00
llc_c_ac.c llc: properly handle dev_queue_xmit() return value 2018-05-30 07:52:20 +02:00
llc_c_ev.c net: replace remaining __FUNCTION__ occurrences 2008-03-05 20:47:47 -08:00
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: properly handle dev_queue_xmit() return value 2018-05-30 07:52:20 +02:00
llc_core.c llc: use refcount_inc_not_zero() for llc_sap_find() 2018-08-22 07:46:08 +02:00
llc_if.c net: llc: include linux/errno.h instead of asm/errno.h 2014-10-24 15:51:42 -04: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: remove noisy WARN from llc_mac_hdr_init 2014-01-28 18:01:32 -08:00
llc_pdu.c [LLC]: skb allocation size for responses 2008-03-31 21:02:47 -07:00
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]: skb allocation size for responses 2008-03-31 21:02:47 -07: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 net: convert sock.sk_refcnt from atomic_t to refcount_t 2017-07-01 07:39:08 -07:00
llc_station.c llc2: Collapse remainder of state machine into simple if-else if-statement 2012-09-17 13:04:19 -04:00
sysctl_net_llc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00