kernel_optimize_test/net
Jia-Ju Bai c7ba50fe23 net: rds: Fix possible null-pointer dereferences in rds_rdma_cm_event_handler_cmn()
In rds_rdma_cm_event_handler_cmn(), there are some if statements to
check whether conn is NULL, such as on lines 65, 96 and 112.
But conn is not checked before being used on line 108:
    trans->cm_connect_complete(conn, event);
and on lines 140-143:
    rdsdebug("DISCONNECT event - dropping connection "
            "%pI6c->%pI6c\n", &conn->c_laddr,
            &conn->c_faddr);
    rds_conn_drop(conn);

Thus, possible null-pointer dereferences may occur.

To fix these bugs, conn is checked before being used.

These bugs are found by a static analysis tool STCheck written by us.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-07-27 13:58:12 -07:00
..
6lowpan
9p 9p pull request for inclusion in 5.13 2019-07-12 17:31:19 -07:00
802
8021q
appletalk
atm
ax25
batman-adv
bluetooth
bpf
bpfilter Kbuild updates for v5.3 2019-07-12 16:03:16 -07:00
bridge netfilter: bridge: make NF_TABLES_BRIDGE tristate 2019-07-19 18:08:14 +02:00
caif
can can: gw: Fix error path of cgw_module_init 2019-07-24 11:19:03 +02:00
ceph Lots of exciting things this time! 2019-07-18 11:05:25 -07:00
core Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 2019-07-25 17:35:03 -07:00
dcb
dccp proc/sysctl: add shared variables for range check 2019-07-18 17:08:07 -07:00
decnet
dns_resolver
dsa net: flow_offload: add flow_block structure and use it 2019-07-19 21:27:45 -07:00
ethernet
hsr
ieee802154
ife
ipv4 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 2019-07-25 17:35:03 -07:00
ipv6 ip6_tunnel: fix possible use-after-free on xmit 2019-07-26 14:17:44 -07:00
iucv
kcm
key
l2tp
l3mdev
lapb
llc
mac80211 mac80211: don't warn about CW params when not using them 2019-07-20 21:40:32 +02:00
mac802154
mpls proc/sysctl: add shared variables for range check 2019-07-18 17:08:07 -07:00
ncsi
netfilter net: flow_offload: add flow_block structure and use it 2019-07-19 21:27:45 -07:00
netlabel
netlink
netrom netrom: hold sock when setting skb->destructor 2019-07-24 15:49:05 -07:00
nfc
nsh
openvswitch ovs: datapath: hide clang frame-overflow warnings 2019-07-24 15:45:11 -07:00
packet
phonet
psample
qrtr
rds net: rds: Fix possible null-pointer dereferences in rds_rdma_cm_event_handler_cmn() 2019-07-27 13:58:12 -07:00
rfkill
rose
rxrpc proc/sysctl: add shared variables for range check 2019-07-18 17:08:07 -07:00
sched ife: error out when nla attributes are empty 2019-07-25 11:21:39 -07:00
sctp Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-07-19 10:06:06 -07:00
smc
strparser
sunrpc Merge branch 'work.mount0' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2019-07-19 10:42:02 -07:00
switchdev
tipc tipc: Fix a typo 2019-07-21 11:41:01 -07:00
tls bpf: sockmap/tls, close can race with map free 2019-07-22 16:04:17 +02:00
unix
vmw_vsock
wimax
wireless pci-v5.3-changes 2019-07-15 20:44:49 -07:00
x25
xdp
xfrm
compat.c
Kconfig
Makefile
socket.c Merge branch 'work.mount0' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2019-07-19 10:42:02 -07:00
sysctl_net.c