[4.2.y-ckt stable] Patch "rtnl: RTM_GETNETCONF: fix wrong return value" has been added to the 4.2.y-ckt tree
Kamal Mostafa
kamal at canonical.com
Mon Mar 7 22:36:18 UTC 2016
This is a note to let you know that I have just added a patch titled
rtnl: RTM_GETNETCONF: fix wrong return value
to the linux-4.2.y-queue branch of the 4.2.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-4.2.y-queue
This patch is scheduled to be released in version 4.2.8-ckt5.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 4.2.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
---8<------------------------------------------------------------
>From 913be3fb1b5fbcf9cf56c74011eb150d803e2ade Mon Sep 17 00:00:00 2001
From: Anton Protopopov <a.s.protopopov at gmail.com>
Date: Tue, 16 Feb 2016 21:43:16 -0500
Subject: rtnl: RTM_GETNETCONF: fix wrong return value
[ Upstream commit a97eb33ff225f34a8124774b3373fd244f0e83ce ]
An error response from a RTM_GETNETCONF request can return the positive
error value EINVAL in the struct nlmsgerr that can mislead userspace.
Signed-off-by: Anton Protopopov <a.s.protopopov at gmail.com>
Acked-by: Cong Wang <xiyou.wangcong at gmail.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
net/ipv4/devinet.c | 2 +-
net/ipv6/addrconf.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 2d9cb17..0420012 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1845,7 +1845,7 @@ static int inet_netconf_get_devconf(struct sk_buff *in_skb,
if (err < 0)
goto errout;
- err = EINVAL;
+ err = -EINVAL;
if (!tb[NETCONFA_IFINDEX])
goto errout;
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index ff6e0dc..335f495 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -569,7 +569,7 @@ static int inet6_netconf_get_devconf(struct sk_buff *in_skb,
if (err < 0)
goto errout;
- err = EINVAL;
+ err = -EINVAL;
if (!tb[NETCONFA_IFINDEX])
goto errout;
--
2.7.0
More information about the kernel-team
mailing list