net/appletalk: fix minor pointer leak to userspace in SIOCFINDIPDDPRT
authorWilly Tarreau <w@1wt.eu>
Wed, 12 Sep 2018 05:36:35 +0000 (07:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 29 Sep 2018 10:06:00 +0000 (03:06 -0700)
commit9951e17efd05b8ad49bbc0db2e6b483f95d94d86
tree216c61a6d615014959d73d3e26dc48d00e55b6e5
parentbba90d3686fd0e2de7b058fbbf2d314527a20d49
net/appletalk: fix minor pointer leak to userspace in SIOCFINDIPDDPRT

[ Upstream commit 9824dfae5741275473a23a7ed5756c7b6efacc9d ]

Fields ->dev and ->next of struct ipddp_route may be copied to
userspace on the SIOCFINDIPDDPRT ioctl. This is only accessible
to CAP_NET_ADMIN though. Let's manually copy the relevant fields
instead of using memcpy().

BugLink: http://blog.infosectcbr.com.au/2018/09/linux-kernel-infoleaks.html
Cc: Jann Horn <jannh@google.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/appletalk/ipddp.c