| 7effbf08 | 16-Jul-2025 |
David Hanisch <hanisch@strato.de> |
udp: fix panic 'Deadlock: cycle in blocking chain'
There is a connection lock hidden in CONN_INC_REF. This lock must not be entered when the reuselist lock is helt, the lock order is the other way a
udp: fix panic 'Deadlock: cycle in blocking chain'
There is a connection lock hidden in CONN_INC_REF. This lock must not be entered when the reuselist lock is helt, the lock order is the other way around. A try enter prevents the deadlock.
refs #5392
show more ...
|
| 6e04cb6c | 26-Mar-2025 |
David Hanisch <hanisch@strato.de> |
udp: fix crash due to race between bind and input white reuse port
In udp_do_bind foreign connections are modified (conn_reuselist is replaced) without lock. Lock can't be obtained due to lock order
udp: fix crash due to race between bind and input white reuse port
In udp_do_bind foreign connections are modified (conn_reuselist is replaced) without lock. Lock can't be obtained due to lock order conn_lock -> uf_lock.
As a result udp_do_bind can free a old reuselist from foreign sockets that is currently in use by udp_input.
This is changed in a way that the reuselist is no longer replaced but the present one is used.
Moreover, to prevent simultaneous modification of the reuselist, udp_reuselist_add and udp_reuselist_remove are always wrapped by the ru_lock.
refs #5215
show more ...
|