android_kernel_oneplus_msm8998/net
Xi Wang ba1cffe025 ax25: avoid overflows in ax25_setsockopt()
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@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-28 14:08:08 -05:00
..
9p
802
8021q vlan: static functions 2011-12-14 02:39:30 -05:00
appletalk
atm
ax25 ax25: avoid overflows in ax25_setsockopt() 2011-12-28 14:08:08 -05:00
batman-adv batman-adv: Fix merge error. 2011-12-16 15:07:28 -05:00
bluetooth Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2011-12-23 17:13:56 -05:00
bridge Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2011-12-23 17:13:56 -05:00
caif net: fix assignment of 0/1 to bool variables. 2011-12-19 22:27:29 -05:00
can
ceph Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client 2011-12-13 14:59:42 -08:00
core rfs: better sizing of dev_flow_table 2011-12-24 16:13:27 -05:00
dcb
dccp module_param: make bool parameters really bool (net & drivers/net) 2011-12-19 22:27:29 -05:00
decnet
dns_resolver
dsa
econet
ethernet
ieee802154
ipv4 netfilter: provide config option to disable ancient procfs parts 2011-12-27 20:45:28 +01:00
ipv6 ipv6: Remove optimistic DAD flag test in ipv6_add_addr() 2011-12-28 13:38:49 -05:00
ipx
irda irda: use msecs_to_jiffies() rather than manual calculation 2011-12-21 15:46:22 -05:00
iucv af_iucv: get rid of state IUCV_SEVERED 2011-12-20 14:05:03 -05:00
key net: use IS_ENABLED(CONFIG_IPV6) 2011-12-11 18:25:16 -05:00
l2tp
lapb
llc llc: llc_cmsg_rcv was getting called after sk_eat_skb. 2011-12-19 15:58:52 -05:00
mac80211 net: fix assignment of 0/1 to bool variables. 2011-12-19 22:27:29 -05:00
netfilter netfilter: provide config option to disable ancient procfs parts 2011-12-27 20:45:28 +01:00
netlabel net: use IS_ENABLED(CONFIG_IPV6) 2011-12-11 18:25:16 -05:00
netlink genetlink: add auto module loading 2011-12-28 13:48:55 -05:00
netrom
nfc Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem 2011-12-15 13:47:58 -05:00
openvswitch
packet Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2011-12-23 17:13:56 -05:00
phonet
rds
rfkill net: fix assignment of 0/1 to bool variables. 2011-12-19 22:27:29 -05:00
rose
rxrpc net: fix assignment of 0/1 to bool variables. 2011-12-19 22:27:29 -05:00
sched Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2011-12-23 17:13:56 -05:00
sctp Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2011-12-23 17:13:56 -05:00
sunrpc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2011-12-23 17:13:56 -05:00
tipc tipc: Allow use of buf_seqno() helper routine by unicast links 2011-12-27 11:33:54 -05:00
unix unix: If we happen to find peer NULL when diag dumping, write zero. 2011-12-26 14:41:55 -05:00
wanrouter
wimax
wireless cfg80211: Restore orig channel values upon disconnect 2011-12-16 09:30:43 -05:00
x25 net:x25: use IS_ENABLED 2011-12-16 15:49:52 -05:00
xfrm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2011-12-23 17:13:56 -05:00
compat.c
Kconfig
Makefile
nonet.c
socket.c
sysctl_net.c