DragonFlyBSD Kernel Audit
DF-0916 / fix_run.log
← back to finding ↓ download raw
BUILD_OK
-rwxr-xr-x  1 maxx  maxx  9760 Jul 14 12:37 trigger
-rwxr-xr-x  1 maxx  maxx  9776 Jul 14 12:37 trigger_fixed
############ DF-0916 smb_time_unix2dos livelock - BEFORE (buggy) ############
### tv_sec=0 (sane)
DF-0916 smb_time_unix2dos livelock demonstrator
  input tv_sec  = 0  (reinterpreted as u_long = 0x0000000000000000, days=0)
  LOOP_CAP      = 500000000 iterations
  iter cap simulates a hard watchdog (real kernel code has NONE)
RESULT: TERMINATED  in 0 iterations, 0.000016s; ddp=0x0021 dtp=0x0000

### tv_sec=INT64_MAX (9223372036854775807)
DF-0916 smb_time_unix2dos livelock demonstrator
  input tv_sec  = 9223372036854775807  (reinterpreted as u_long = 0x7fffffffffffffff, days=106751991167300)
  LOOP_CAP      = 500000000 iterations
  iter cap simulates a hard watchdog (real kernel code has NONE)
RESULT: LIVELOCK    - hit LOOP_CAP after 500000000 iterations (0.54s)
        Kernel code (no cap) would continue past 500000000 iterations;
        full iteration count for this input ~= 292471208677 => minutes of kernel CPU.

### tv_sec=-1 (reinterpreted u_long = UINT64_MAX)
DF-0916 smb_time_unix2dos livelock demonstrator
  input tv_sec  = -1  (reinterpreted as u_long = 0xffffffffffffffff, days=213503982334601)
  LOOP_CAP      = 500000000 iterations
  iter cap simulates a hard watchdog (real kernel code has NONE)
RESULT: LIVELOCK    - hit LOOP_CAP after 500000000 iterations (0.53s)
        Kernel code (no cap) would continue past 500000000 iterations;
        full iteration count for this input ~= 584942417355 => minutes of kernel CPU.

############ DF-0916 smb_time_unix2dos livelock - AFTER (fixed) ############
### tv_sec=0 (sane)
DF-0916 smb_time_unix2dos livelock demonstrator
  input tv_sec  = 0  (reinterpreted as u_long = 0x0000000000000000, days=0)
  LOOP_CAP      = 500000000 iterations
  iter cap simulates a hard watchdog (real kernel code has NONE)
RESULT: TERMINATED  in 0 iterations, 0.000015s; ddp=0x0021 dtp=0x0000

### tv_sec=INT64_MAX (9223372036854775807)
DF-0916 smb_time_unix2dos livelock demonstrator
  input tv_sec  = 9223372036854775807  (reinterpreted as u_long = 0x7fffffffffffffff, days=106751991167300)
  LOOP_CAP      = 500000000 iterations
  iter cap simulates a hard watchdog (real kernel code has NONE)
RESULT: TERMINATED  in 137 iterations, 0.000013s; ddp=0xfe22 dtp=0x0000

### tv_sec=-1 (reinterpreted u_long = UINT64_MAX)
DF-0916 smb_time_unix2dos livelock demonstrator
  input tv_sec  = -1  (reinterpreted as u_long = 0xffffffffffffffff, days=213503982334601)
  LOOP_CAP      = 500000000 iterations
  iter cap simulates a hard watchdog (real kernel code has NONE)
RESULT: TERMINATED  in 137 iterations, 0.000013s; ddp=0xfe22 dtp=0x0000