summaryrefslogtreecommitdiffstats
path: root/net/dccp/ipv6.c
diff options
context:
space:
mode:
authorJames Chapman2008-06-10 21:35:00 +0200
committerDavid S. Miller2008-06-10 21:35:00 +0200
commit6b6707a50c7598a83820077393f8823ab791abf8 (patch)
tree5a707de3b34eeaa2bad9b16d5ad006abe4a6d901 /net/dccp/ipv6.c
parentipv6 netns: init net is used to set bindv6only for new sock (diff)
downloadkernel-qcow2-linux-6b6707a50c7598a83820077393f8823ab791abf8.tar.gz
kernel-qcow2-linux-6b6707a50c7598a83820077393f8823ab791abf8.tar.xz
kernel-qcow2-linux-6b6707a50c7598a83820077393f8823ab791abf8.zip
l2tp: Fix potential memory corruption in pppol2tp_recvmsg()
This patch fixes a potential memory corruption in pppol2tp_recvmsg(). If skb->len is bigger than the caller's buffer length, memcpy_toiovec() will go into unintialized data on the kernel heap, interpret it as an iovec and start modifying memory. The fix is to change the memcpy_toiovec() call to skb_copy_datagram_iovec() so that paged packets (rare for PPPOL2TP) are handled properly. Also check that the caller's buffer is big enough for the data and set the MSG_TRUNC flag if it is not so. Reported-by: Ilja <ilja@netric.org> Signed-off-by: James Chapman <jchapman@katalix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/ipv6.c')
0 files changed, 0 insertions, 0 deletions