patchlwIP - A Lightweight TCP/IP stack - Patches: patch #10121, bug: httpd creates circular linked...


You are not allowed to post comments on this tracker with your current authentication level.

patch #10121: bug: httpd creates circular linked list that causes an infinite loop

Submitter:  Peter Lawrence <majbthrd>
Submitted:  Wed 13 Oct 2021 09:52:03 PM UTC
Category:  Contrib Priority:  6
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Planned Release:  None

Wed 13 Oct 2021 09:52:03 PM UTC, original submission:  

This pertains to the httpd service in ./src/apps/http/httpd.c

Unless the user has specifically overridden the normally enabled LWIP_HTTPD_SUPPORT_REQUESTLIST, the right input sequence will cause httpd to go into an infinite loop.

To reproduce, telnet to the httpd service port and press the ENTER key twice.

What I observe is that this test procedure results in two calls to the httpd handler with the same pbuf pointer.  In the code below the comment "enqueue the pbuf", there is a call to pbuf_cat() to concatenate the existing pbuf to itself, and in the later pbuf_len() call will then proceed to count this circular linked list for the rest of time.

Peter Lawrence <majbthrd>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #52096:  httpd.diff added by majbthrd (483B - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by majbthrd (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.




    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-10-13 majbthrd Attached File- Added httpd.diff, #52096

    Back to the top

    Powered by Savane 3.9