summaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-12-30 22:40:50 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-15 23:31:38 (GMT)
commitf680803b3bd132c43ca72fd02b4096309b603af4 (patch)
treeb2d26f084bb29e1e507528d0fff56dcfbbf25c85 /net/core
parent4e18f0b53730ef56fa16e271d4971611f6a95ed9 (diff)
downloadlinux-fsl-qoriq-f680803b3bd132c43ca72fd02b4096309b603af4.tar.xz
net: llc: fix use after free in llc_ui_recvmsg
[ Upstream commit 4d231b76eef6c4a6bd9c96769e191517765942cb ] While commit 30a584d944fb fixes datagram interface in LLC, a use after free bug has been introduced for SOCK_STREAM sockets that do not make use of MSG_PEEK. The flow is as follow ... if (!(flags & MSG_PEEK)) { ... sk_eat_skb(sk, skb, false); ... } ... if (used + offset < skb->len) continue; ... where sk_eat_skb() calls __kfree_skb(). Therefore, cache original length and work on skb_len to check partial reads. Fixes: 30a584d944fb ("[LLX]: SOCK_DGRAM interface fixes") Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Cc: Stephen Hemminger <stephen@networkplumber.org> Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/core')
0 files changed, 0 insertions, 0 deletions