OSDN Git Service

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:08:52 +0000 (03:08 -0700)
commitfee0d234419708192925c9e25a461f1f43dab24f
tree09072810fa63d73543af3b70aae281b2b9ee32e4
parent2ec3b47a784685347c29ff5e46bc1f2429eaf264
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