lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <447cf566-8b6e-80d2-b20d-c20ccd89bdb9@linux.microsoft.com>
Date:   Mon, 28 Feb 2022 19:51:11 +0100
From:   Kai Lüke <kailueke@...ux.microsoft.com>
To:     netdev@...r.kernel.org,
        Steffen Klassert <steffen.klassert@...unet.com>,
        Eyal Birger <eyal.birger@...il.com>
Cc:     Kai Lueke <kailuke@...rosoft.com>
Subject: [PATCH 1/2] Revert "xfrm: interface with if_id 0 should return error"

This reverts commit 8dce43919566f06e865f7e8949f5c10d8c2493f5 because it
breaks userspace (e.g., Cilium is affected because it used id 0 for the
dummy state https://github.com/cilium/cilium/pull/18789).

Signed-off-by: Kai Lueke <kailuke@...rosoft.com>
---
 net/xfrm/xfrm_interface.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/net/xfrm/xfrm_interface.c b/net/xfrm/xfrm_interface.c
index 57448fc519fc..41de46b5ffa9 100644
--- a/net/xfrm/xfrm_interface.c
+++ b/net/xfrm/xfrm_interface.c
@@ -637,16 +637,11 @@ static int xfrmi_newlink(struct net *src_net,
struct net_device *dev,
             struct netlink_ext_ack *extack)
 {
     struct net *net = dev_net(dev);
-    struct xfrm_if_parms p = {};
+    struct xfrm_if_parms p;
     struct xfrm_if *xi;
     int err;
 
     xfrmi_netlink_parms(data, &p);
-    if (!p.if_id) {
-        NL_SET_ERR_MSG(extack, "if_id must be non zero");
-        return -EINVAL;
-    }
-
     xi = xfrmi_locate(net, &p);
     if (xi)
         return -EEXIST;
@@ -671,12 +666,7 @@ static int xfrmi_changelink(struct net_device *dev,
struct nlattr *tb[],
 {
     struct xfrm_if *xi = netdev_priv(dev);
     struct net *net = xi->net;
-    struct xfrm_if_parms p = {};
-
-    if (!p.if_id) {
-        NL_SET_ERR_MSG(extack, "if_id must be non zero");
-        return -EINVAL;
-    }
+    struct xfrm_if_parms p;
 
     xfrmi_netlink_parms(data, &p);
     xi = xfrmi_locate(net, &p);
-- 
2.35.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ