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] [day] [month] [year] [list]
Message-Id: <20111228.140819.861154490395622829.davem@davemloft.net>
Date:	Wed, 28 Dec 2011 14:08:19 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	xi.wang@...il.com
Cc:	linux-hams@...r.kernel.org, netdev@...r.kernel.org,
	ralf@...ux-mips.org
Subject: Re: [PATCH -next] ax25: avoid overflows in ax25_setsockopt()

From: Xi Wang <xi.wang@...il.com>
Date: Tue, 27 Dec 2011 14:43:19 -0500

> Commit be639ac6 ("NET: AX.25: Check ioctl arguments to avoid overflows
> further down the road") rejects very large arguments, but doesn't
> completely fix overflows on 64-bit systems.  Consider the AX25_T2 case.
> 
> 	int opt;
> 	...
> 	if (opt < 1 || opt > ULONG_MAX / HZ) {
> 		res = -EINVAL;
> 		break;
> 	}
> 	ax25->t2 = opt * HZ;
> 
> The 32-bit multiplication opt * HZ would overflow before being assigned
> to 64-bit ax25->t2.  This patch changes "opt" to unsigned long.
> 
> Signed-off-by: Xi Wang <xi.wang@...il.com>
> Cc: Ralf Baechle <ralf@...ux-mips.org>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ