lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180223204104.GA15686@avx2>
Date:   Fri, 23 Feb 2018 23:41:04 +0300
From:   Alexey Dobriyan <adobriyan@...il.com>
To:     Stefan Hellermann <stefan@...2masters.de>
Cc:     netdev@...r.kernel.org, andriy.shevchenko@...ux.intel.com,
        andrew@...n.ch, linux@....linux.org.uk, jason@...edaemon.net,
        dv@...lmann.ch, gregory.clement@...e-electrons.com,
        linux-arm-kernel@...ts.infradead.org,
        "[ 4 . 4+ ]" <stable@...r.kernel.org>
Subject: Re: [PATCH] net: Allow mac_pton() to work on non-NULL terminated
 strings

On Fri, Feb 23, 2018 at 09:17:48PM +0100, Stefan Hellermann wrote:
> @@ -8,10 +8,6 @@ bool mac_pton(const char *s, u8 *mac)
>  {
>  	int i;
>  
> -	/* XX:XX:XX:XX:XX:XX */
> -	if (strlen(s) < 3 * ETH_ALEN - 1)
> -		return false;
> -
>  	/* Don't dirty result unless string is valid MAC. */
>  	for (i = 0; i < ETH_ALEN; i++) {
>  		if (!isxdigit(s[i * 3]) || !isxdigit(s[i * 3 + 1]))

Short string will bail in the loop, indeed.

Reviewed-by: Alexey Dobriyan <adobriyan@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ