buglwIP - A Lightweight TCP/IP stack - Bugs: bug #39956, netif_create_ip6_linklocal_address...

 
 

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

bug #39956: netif_create_ip6_linklocal_address out of bounds access of netif::hwaddr

Submitted by:  Valery Ushakov <uwe>
Submitted on:  Thu 05 Sep 2013 05:27:49 PM UTC  
 
Category: IPv6Severity: 3 - Normal
Item Group: Compiler WarningStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: git head

Wed 04 Mar 2015 07:58:55 PM UTC, comment #3:

Fixed, thanks for reporting.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Mon 25 Aug 2014 04:04:35 PM UTC, comment #2:

Thanks for posting, I get this warning too so I'll try to merge the fix.

Ivan Delamer <idelamer>
Project Member
Sun 24 Aug 2014 10:40:03 PM UTC, comment #1:

gcc with certain options will warn on this overflow, eg:

It's entirely because of the incorrect assumption on the size of hwaddr.

This possibly naive diff resolves the compiler issue:

But, like the rest of that loop, it assumes the lower half of the address is all 0 already.

Chris Luke <chrisy>
Thu 05 Sep 2013 05:27:49 PM UTC, original submission:

In the !from_mac_48bit case hwaddr is read in a loop from 0 to 7 as netif->hwaddr[netif->hwaddr_len - i - 1] and no check is done if hwaddr_len is large enough.

NETIF_MAX_HWADDR_LEN is 6 by default, so the above loop reads from hwaddr out of bounds.

Valery Ushakov <uwe>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by idelamer (Posted a comment)
  • -unavailable- added by chrisy (Posted a comment)
  • -unavailable- added by goldsimon (Updated the item)
  • -unavailable- added by uwe (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 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 04 Mar 2015 07:58:55 PM UTCgoldsimonStatusConfirmed=>Fixed
      Assigned toidelamer=>goldsimon
      Open/ClosedOpen=>Closed
    Mon 25 Aug 2014 04:04:35 PM UTCidelamerItem GroupFaulty Behaviour=>Compiler Warning
      StatusNone=>Confirmed
      Assigned toNone=>idelamer
    Thu 20 Feb 2014 09:18:39 PM UTCgoldsimonCategoryNone=>IPv6

    Back to the top


    Powered by Savane 3.1-cleanup1