break;
 
        case AX25_T1:
-               if (ax25_ctl.arg < 1)
+               if (ax25_ctl.arg < 1 || ax25_ctl.arg > ULONG_MAX / HZ)
                        goto einval_put;
                ax25->rtt = (ax25_ctl.arg * HZ) / 2;
                ax25->t1  = ax25_ctl.arg * HZ;
                break;
 
        case AX25_T2:
-               if (ax25_ctl.arg < 1)
+               if (ax25_ctl.arg < 1 || ax25_ctl.arg > ULONG_MAX / HZ)
                        goto einval_put;
                ax25->t2 = ax25_ctl.arg * HZ;
                break;
                break;
 
        case AX25_T3:
+               if (ax25_ctl.arg > ULONG_MAX / HZ)
+                       goto einval_put;
                ax25->t3 = ax25_ctl.arg * HZ;
                break;
 
        case AX25_IDLE:
+               if (ax25_ctl.arg > ULONG_MAX / (60 * HZ))
+                       goto einval_put;
+
                ax25->idle = ax25_ctl.arg * 60 * HZ;
                break;
 
                break;
 
        case AX25_T1:
-               if (opt < 1) {
+               if (opt < 1 || opt > ULONG_MAX / HZ) {
                        res = -EINVAL;
                        break;
                }
                break;
 
        case AX25_T2:
-               if (opt < 1) {
+               if (opt < 1 || opt > ULONG_MAX / HZ) {
                        res = -EINVAL;
                        break;
                }
                break;
 
        case AX25_T3:
-               if (opt < 1) {
+               if (opt < 1 || opt > ULONG_MAX / HZ) {
                        res = -EINVAL;
                        break;
                }
                break;
 
        case AX25_IDLE:
-               if (opt < 0) {
+               if (opt < 0 || opt > ULONG_MAX / (60 * HZ)) {
                        res = -EINVAL;
                        break;
                }