[Bug 277226] net/miniupnpd: duplicate mappings, corrupted replies to clients

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 22 Feb 2024 20:50:01 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277226

            Bug ID: 277226
           Summary: net/miniupnpd: duplicate mappings, corrupted replies
                    to clients
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: sbaranov@gmail.com
                CC: squat@squat.no
                CC: squat@squat.no
             Flags: maintainer-feedback?(squat@squat.no)

Originally discovered in OPNSense:
https://github.com/opnsense/plugins/issues/3831.
See also https://forum.opnsense.org/index.php?topic=38732.0.

OPNsense 24.1.2_1-amd64
FreeBSD 13.2-RELEASE-p10
OpenSSL 3.0.13
miniupnpd 2.3.3

Over time, duplicate mappings like this are created:

```
62852   tcp     10.0.0.87       6690    upnpclient:6690
62852   tcp     10.0.0.87       6690    upnpclient:6690
62852   tcp     10.0.0.87       6690    upnpclient:6690
```

If you try to get the mapping list using miniupnpc, it returns corrupted
results:

```
i protocol exPort->inAddr:inPort description remoteHost leaseTime
 0 UDP     0->10.0.0.87:0     '' '34.26.0.0' 0
 1 UDP     0->10.0.0.87:0     '' '34.26.0.0' 0
 2 UDP     0->10.0.0.87:0     '' '34.26.0.0' 0
```

-- 
You are receiving this mail because:
You are the assignee for the bug.