Bug 2227

Summary: ether_aton() accepts malformed input
Product: uClibc Reporter: David Ramos <ramos>
Component: NetworkingAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: ramos, uclibc-cvs
Priority: P5    
Version: 0.9.31   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:
Attachments: testcase for ether_aton

Description David Ramos 2010-07-16 03:16:16 UTC
Created attachment 2245 [details]
testcase for ether_aton

As of 0.9.31, ether_aton() accepts malformed input by performing an unchecked OR \x20 as an efficient alternative to tolower(). For example, ASCII control character \x12 (malformed input) is treated by ether_aton as an ASCII '2' (\x32) character. It should instead return NULL to indicate the error.

I've attached a testcase to illustrate the bug.

Note that the behavior was correct in uClibc 0.9.30.3.
Comment 1 David Ramos 2011-04-06 07:57:34 UTC
*bump* this bug is still unassigned after 9 months...
Comment 2 Bernhard Reutner-Fischer 2011-05-02 08:31:17 UTC
(In reply to comment #1)
> *bump* this bug is still unassigned after 9 months...

thanks for the testsuite entry.

This should be fixed by 049aebd7eb798bca4e0fb3c0532328ad9d85cc7c, please verify against current master.