Summary: Bad assertion in lwip_poll_dec_sockets_used()
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: jllledo
Submitted on: Thu 01 Nov 2018 06:14:53 PM CET
Severity: 3 - Normal
Item Group: Faulty Behaviour
Assigned to: None
Discussion Lock: Any
Planned Release: None
lwIP version: git head
I wrote a patch to remove the assertion in lwip_poll_dec_sockets_used(), b/c
it seems to me it allows clients to abort the stack by just calling poll()
with an invalid pollfd array. In particular, any pollfd which 'fd' is not a
valid port number makes the assertion true.
Besides, that assertion is not in lwip_poll_inc_sockets_used(), then I don't
know why is it in lwip_poll_dec_sockets_used().