diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2023-11-06 13:17:09 +1100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2023-11-07 09:55:08 +0100 |
commit | de974f0cf13eeaaa5e06b2cf7bebbe59af261e76 (patch) | |
tree | f129ce374da210f4aaa1f7662dd695c1880ba198 /.gitignore | |
parent | 480aa4a10818ee25d739af2f9f156dcbbbcb64dd (diff) | |
download | passt-de974f0cf13eeaaa5e06b2cf7bebbe59af261e76.tar passt-de974f0cf13eeaaa5e06b2cf7bebbe59af261e76.tar.gz passt-de974f0cf13eeaaa5e06b2cf7bebbe59af261e76.tar.bz2 passt-de974f0cf13eeaaa5e06b2cf7bebbe59af261e76.tar.lz passt-de974f0cf13eeaaa5e06b2cf7bebbe59af261e76.tar.xz passt-de974f0cf13eeaaa5e06b2cf7bebbe59af261e76.tar.zst passt-de974f0cf13eeaaa5e06b2cf7bebbe59af261e76.zip |
udp: Remove socket from udp_{tap,splice}_map when timed out
We save sockets bound to particular ports in udp_{tap,splice}_map for
reuse later. If they're not used for a time, we time them out and close
them. However, when that happened, we weren't actually removing the fds
from the relevant map. That meant that later interactions on the same port
could get a stale fd from the map.
The stale fd might be closed, leading to unexpected EBADF errors, or it
could have been re-used by a completely different socket bound to a
different port, which could lead to us incorrectly forwarding packets.
Reported-by: Chris Kuhn <kuhnchris@kuhnchris.eu>
Reported-by: Jay <bugs.passt.top@bitsbetwixt.com>
Link: https://bugs.passt.top/show_bug.cgi?id=57
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions