buglwIP - A Lightweight TCP/IP stack - Bugs: bug #61126, ram_end write outside heap...

 
 

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

bug #61126: ram_end write outside heap...

Submitter:  Dag Midling Larsen <dml_sw>
Submitted:  Wed 08 Sep 2021 10:17:01 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Invalid
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  Other

Wed 08 Sep 2021 05:31:13 PM UTC, comment #1: 

Why do you think so? 'ram_heap' is allocated like this:

uint8_t ram_heap[MEM_SIZE_ALIGNED + (2U * SIZEOF_STRUCT_MEM)];

so writing to a struct mem * which is calculated by 'ram_heap[MEM_SIZE_ALIGNED]' should surely work, no?

I'll close this as invalid, but you can still respond here if you think otherwise. Or if I'm missing something.

Simon Goldschmidt <goldsimon>
Group administrator
Wed 08 Sep 2021 10:17:01 AM UTC, original submission:  

Hi

LwIp version 2.1.2., mem.c, lines [530, 534]:
  /* initialize the end of the heap */
  ram_end = ptr_to_mem(MEM_SIZE_ALIGNED);
  ram_end->used = 1;
  ram_end->next = MEM_SIZE_ALIGNED;
  ram_end->prev = MEM_SIZE_ALIGNED;

These lines writes 9 bytes beyond heap allocated by application.

Regards,
Dag

Dag Midling Larsen <dml_sw>

 

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

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by dml_sw (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.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-09-08 goldsimon StatusNone Invalid
        Assigned toNone goldsimon
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code