buglwIP - A Lightweight TCP/IP stack - Bugs: bug #51135, etharp_query might under-allocate...

 
 

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

bug #51135: etharp_query might under-allocate when copying a volatile packet

Submitted by:  Tim Cussins <tcussins>
Submitted on:  Mon 29 May 2017 02:24:43 PM UTC  
 
Category: IPv4Severity: 3 - Normal
Item Group: Crash ErrorStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: git head

Mon 29 May 2017 07:49:35 PM UTC, comment #1:

Wow, congrats on finding this! The bug exists since 2007 :-(

Pushed, thanks for the patch!

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Mon 29 May 2017 02:24:43 PM UTC, original submission:

Hi all,

If etharp_query() needs to queue a packet that involves volatile pbufs, it allocates a new pbuf from RAM, and copies the outgoing packet into the new pbuf, and enqueues the new pbuf in place of the outgoing packet.

The line that allocates the pbuf allocation uses a temporary struct pbuf* 'p', instead of the outgoing packet pbuf, 'q'. This can result in the allocation of a pbuf that is not large enough to allow the copy to take place :)

Attached patch has slightly fuller explanation & fix.

Thanks,
Tim

Tim Cussins <tcussins>

 

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by goldsimon (Posted a comment)
  • -unavailable- added by tcussins (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 29 May 2017 07:49:35 PM UTCgoldsimonStatusNone=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed
    Mon 29 May 2017 02:24:43 PM UTCtcussinsAttached File-=>Added 0001-etharp.c-Ensure-etharp_query-allocates-adequate-pbuf.patch, #40808

    Back to the top


    Powered by Savane 3.1-cleanup1