buglwIP - A Lightweight TCP/IP stack - Bugs: bug #51195, Calling inet_pton() causes buffer...

 
 

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

bug #51195: Calling inet_pton() causes buffer overrun on a struct in6_addr.

Submitted by:  Dario Tedeschi <zr5dt>
Submitted on:  Wed 07 Jun 2017 01:11:41 AM UTC  
 
Category: IPv6Severity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: git head

Wed 14 Jun 2017 08:40:06 PM UTC, comment #1:

Fixed in a different way. Thanks for reporting!

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Wed 07 Jun 2017 01:11:41 AM UTC, original submission:

Since inet_pton is just a macro that wraps ip6addr_aton() the bug actually resides in ip6addr_aton(). The end of that function calls ip6_addr_clear_zone(), which writes to the 'zone' member of ip6_addr_t. Unfortunately that is one byte more than sizeof(struct in6_addr), which is the structure passed in a call to inet_pton(AF_INET6, ...).

Attached is a patch used to work around the problem (off commit 9dee34600028a3).

Dario Tedeschi <zr5dt>

 

Attached Files
file #40870:  posix-socket-api.patch added by zr5dt (2KiB - text/x-patch - Improved patch)
file #40869:  posix-socket-api.patch added by zr5dt (2KiB - text/x-patch)

 

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 zr5dt (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 14 Jun 2017 08:40:06 PM UTCgoldsimonStatusNone=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed
    Wed 07 Jun 2017 01:17:23 AM UTCzr5dtAttached File-=>Added posix-socket-api.patch, #40870
    Wed 07 Jun 2017 01:11:41 AM UTCzr5dtAttached File-=>Added posix-socket-api.patch, #40869

    Back to the top


    Powered by Savane 3.1-cleanup1