aboutsummaryrefslogtreecommitdiff
path: root/sys/tools
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2017-11-14 18:18:18 +0000
committerEd Maste <emaste@FreeBSD.org>2017-11-14 18:18:18 +0000
commit81d606f52e214621ca24eba9789fe1cd99d5f189 (patch)
tree182a1f50106943751a19a4a13510dba311b2509e /sys/tools
parentc52ef9bbff5112e376d7541efa740038e3c1d1af (diff)
downloadsrc-81d606f52e214621ca24eba9789fe1cd99d5f189.tar.gz
src-81d606f52e214621ca24eba9789fe1cd99d5f189.zip
disallow clock_settime too far in the future to avoid panic
clock_ts_to_ct has a KASSERT that the converted year fits into four digits. By default (sysctl debug.allow_insane_settime is 0) the kernel disallows a time too far in the future, using a value of 9999 366-day years. However, clock_settime is epoch-relative and the assertion will fail with a tv_sec corresponding to some 8030 years. Avoid trying to be too clever, and just use a limit of 8000 365-day years past the epoch. Submitted by: Heqing Yan <scottieyan@gmail.com> Reported by: Syzkaller (https://github.com/google/syzkaller) MFC after: 1 week Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/head/; revision=325825
Diffstat (limited to 'sys/tools')
0 files changed, 0 insertions, 0 deletions