]> git.karo-electronics.de Git - linux-beck.git/commit
kcm: fix a null pointer dereference in kcm_sendmsg()
authorWANG Cong <xiyou.wangcong@gmail.com>
Mon, 13 Feb 2017 19:13:16 +0000 (11:13 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Feb 2017 10:10:50 +0000 (11:10 +0100)
commit90aa7993d5c7fdc476009189a9b2a65d97fe9350
treeff563a2b9bf343ccdf906f2c9f61877cb9b96c71
parent1409935400aa1faffd9fe1830adb8ea08ea424d2
kcm: fix a null pointer dereference in kcm_sendmsg()

[ Upstream commit cd27b96bc13841ee7af25837a6ae86fee87273d6 ]

In commit 98e3862ca2b1 ("kcm: fix 0-length case for kcm_sendmsg()")
I tried to avoid skb allocation for 0-length case, but missed
a check for NULL pointer in the non EOR case.

Fixes: 98e3862ca2b1 ("kcm: fix 0-length case for kcm_sendmsg()")
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Cc: Tom Herbert <tom@herbertland.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Tom Herbert <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/kcm/kcmsock.c