Gert Doering has uploaded a new patch set (#2) to the change originally created 
by Răzvan Cojocaru. ( https://gerrit.openvpn.net/c/openvpn/+/2101?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by Antonio Quartulli


Change subject: dco_linux: check ovpn_dco_nlmsg_create() result in new/get peer
......................................................................

dco_linux: check ovpn_dco_nlmsg_create() result in new/get peer

dco_new_peer() and dco_get_peer() passed the result straight to
nla_nest_start() without checking for NULL. Return -ENOMEM like the
other callers.

dco_new_peer() unchecked since e34437c2 ("dco: introduce low-level code
for handling ovpn-dco in the Linux kernel"), dco_get_peer() since
5a8fb55a ("dco-linux: implement dco_get_peer_stats{, multi} API").

Change-Id: Idb3c52174e588016240e9c9162a1676e1531c551
Signed-off-by: Razvan Cojocaru <[email protected]>
Acked-by: Antonio Quartulli <[email protected]>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2101
Message-Id: <[email protected]>
URL: 
https://www.mail-archive.com/[email protected]/msg41409.html
Signed-off-by: Gert Doering <[email protected]>
---
M src/openvpn/dco_linux.c
1 file changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/01/2101/2

diff --git a/src/openvpn/dco_linux.c b/src/openvpn/dco_linux.c
index 60107c4..3a55b6e 100644
--- a/src/openvpn/dco_linux.c
+++ b/src/openvpn/dco_linux.c
@@ -239,6 +239,12 @@
     msg(D_DCO_DEBUG, "%s: peer-id %u, fd %d, remote addr: %s", __func__, 
peerid, sd, remotestr);

     struct nl_msg *nl_msg = ovpn_dco_nlmsg_create(dco, OVPN_CMD_PEER_NEW);
+    if (!nl_msg)
+    {
+        gc_free(&gc);
+        return -ENOMEM;
+    }
+
     struct nlattr *attr = nla_nest_start(nl_msg, OVPN_A_PEER);
     int ret = -EMSGSIZE;

@@ -1234,6 +1240,11 @@
     msg(D_DCO_DEBUG | M_NOIPREFIX, "%s: peer-id %d", __func__, peer_id);

     struct nl_msg *nl_msg = ovpn_dco_nlmsg_create(dco, OVPN_CMD_PEER_GET);
+    if (!nl_msg)
+    {
+        return -ENOMEM;
+    }
+
     struct nlattr *attr = nla_nest_start(nl_msg, OVPN_A_PEER);
     int ret = -EMSGSIZE;


--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/2101?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Idb3c52174e588016240e9c9162a1676e1531c551
Gerrit-Change-Number: 2101
Gerrit-PatchSet: 2
Gerrit-Owner: Răzvan Cojocaru <[email protected]>
Gerrit-Reviewer: Antonio Quartulli <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to