[PATCH] tty: an overflow of multiplication in drivers/tty/cyclades.c

2013-12-16 Thread xqx12
there is an overflow in the code : cyz_polling_cycle = (arg * HZ) / 1000, the multiplicator arg comes from user, so it may be an overflow if arg is a big number. And the value of cyc_polling_cycle will be wrong when it is used next time. Reported-by: Qixue Xiao Suggested-by: Yongjian Xu Suggeste

[PATCH] tty: an overflow of multiplication in drivers/tty/cyclades.c

2013-12-17 Thread xqx12
there is an overflow in the code : cyz_polling_cycle = (arg * HZ) / 1000, the multiplicator arg comes from user, so it may be an overflow if arg is a big number. And the value of cyc_polling_cycle will be wrong when it is used next time. Reported-by: Qixue Xiao Suggested-by: Yongjian Xu Suggeste

[PATCH] a multiplication overflow in drivers/pps/pps.c

2013-12-17 Thread xqx12
there is an overflow in the following code : ticks = fdata.timeout.sec * HZ; while ticks is a signed 64-bit, but the result of fdata.timeout.sec * HZ will be converted be 32-bit first. So ticks will be a wrong value after multiplication overflow. Reported-by: Qixue Xiao Suggested-by: Yongjian X