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.

Submitter:  Dario Tedeschi <zr5dt>
Submitted:  Wed 07 Jun 2017 01:11:41 AM UTC
   
 
Category:  IPv6 Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned 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>
Group administrator
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>

 

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

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
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by zr5dt (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-06-14 goldsimon StatusNone Fixed
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2017-06-07 zr5dt Attached File- Added posix-socket-api.patch, #40870
    2017-06-07 zr5dt Attached File- Added posix-socket-api.patch, #40869

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code