Attention is currently required from: Gert Doering.

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

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


Change subject: multi: don't let compression corrupt queued broadcast packets
......................................................................

multi: don't let compression corrupt queued broadcast packets

A broadcast or multicast packet is queued once and shared by all
recipients. With compress, compress stub or compress lz4 the byte swap
framing rewrites the packet in place, so every recipient after the
first got it with its first byte replaced by 0xFB. In TAP mode this
broke ARP and DHCP broadcasts for all clients but one. In TUN mode the
client's kernel rejected the packet, logged as "write to TUN/TAP:
Invalid argument".

When the recipient uses the byte swap, copy a buffer that is still
queued for other recipients before handing it to encrypt_sign().

GitHub: closes OpenVPN/openvpn#461
Change-Id: I8d424804372707a23fdc6fe77163cffabf72ea00
Signed-off-by: Razvan Cojocaru <[email protected]>
Acked-by: Antonio Quartulli <[email protected]>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2377
Message-Id: <[email protected]>
URL: 
https://www.mail-archive.com/[email protected]/msg42300.html
Signed-off-by: Gert Doering <[email protected]>
---
M src/openvpn/multi.c
1 file changed, 14 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/77/2377/3

diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c
index 900b5a3..a71a484 100644
--- a/src/openvpn/multi.c
+++ b/src/openvpn/multi.c
@@ -3757,6 +3757,20 @@
     {
         unsigned int pip_flags = PIPV4_PASSTOS | PIPV6_ICMP_NOHOST_SERVER;

+#ifdef USE_COMP
+        /* the compression byte swap changes the packet in place, so
+         * don't let it touch a buffer that other recipients still have
+         * queued */
+        const struct compress_context *comp = 
item.instance->context.c2.comp_context;
+        if (item.buffer->refcount > 1 && comp && (comp->flags & COMP_F_SWAP))
+        {
+            struct mbuf_buffer *mb = mbuf_alloc_buf(&item.buffer->buf);
+            mb->flags = item.buffer->flags;
+            mbuf_free_buf(item.buffer);
+            item.buffer = mb;
+        }
+#endif
+
         set_prefix(item.instance);
         item.instance->context.c2.buf = item.buffer->buf;
         if (item.buffer->flags

--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/2377?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: I8d424804372707a23fdc6fe77163cffabf72ea00
Gerrit-Change-Number: 2377
Gerrit-PatchSet: 3
Gerrit-Owner: Răzvan Cojocaru <[email protected]>
Gerrit-Reviewer: Antonio Quartulli <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-Reviewer: Gert Doering <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Gert Doering <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to