diff options
| author | Laurent Vivier <lvivier@redhat.com> | 2025-04-30 18:05:25 +0200 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2025-05-02 11:58:25 +0200 |
| commit | 11be695f5c0a6a7d74e9628e9863e665f59d511f (patch) | |
| tree | ba59e1f6032a5ea291f0452b2b9599b4163c040c /doc | |
| parent | 6a96cd97a5fda26a8f12531a72f6a969e476ad9e (diff) | |
| download | passt-11be695f5c0a6a7d74e9628e9863e665f59d511f.tar passt-11be695f5c0a6a7d74e9628e9863e665f59d511f.tar.gz passt-11be695f5c0a6a7d74e9628e9863e665f59d511f.tar.bz2 passt-11be695f5c0a6a7d74e9628e9863e665f59d511f.tar.lz passt-11be695f5c0a6a7d74e9628e9863e665f59d511f.tar.xz passt-11be695f5c0a6a7d74e9628e9863e665f59d511f.tar.zst passt-11be695f5c0a6a7d74e9628e9863e665f59d511f.zip | |
flow: fix podman issue #25959
While running piHole using podman, traffic can trigger the following
assert:
ASSSERTION FAILED in flow_alloc (flow.c:521): flow->f.state == FLOW_STATE_FREE
Backtrace shows that this happens in flow_defer_handler():
#4 0x00005610d6f5b481 flow_alloc (passt + 0xb481)
#5 0x00005610d6f74f86 udp_flow_from_sock (passt + 0x24f86)
#6 0x00005610d6f737c3 udp_sock_fwd (passt + 0x237c3)
#7 0x00005610d6f74c07 udp_flush_flow (passt + 0x24c07)
#8 0x00005610d6f752c2 udp_flow_defer (passt + 0x252c2)
#9 0x00005610d6f5bce1 flow_defer_handler (passt + 0xbce1)
We are trying to allocate a new flow inside the loop freeing them.
Inside the loop free_head points to the first free flow entry in the
current cluster. But if we allocate a new entry during the loop,
free_head is not updated and can point now to the entry we have just
allocated.
We can fix the problem by spliting the loop in two parts:
- first part where we can close some of them and allocate some new
flow entries,
- second part where we free the entries closed in the previous loop
and we aggregate the free entries to merge consecutive the clusters.
Reported-by: Martin Rijntjes <bugs@air-global.nl>
Link: https://github.com/containers/podman/issues/25959
Fixes: 9725e7988837 ("udp_flow: Don't discard packets that arrive between bind() and connect()")
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions
