diff options
author | bde <bde@FreeBSD.org> | 2002-05-05 04:33:09 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 2002-05-05 04:33:09 +0000 |
commit | e0f62a1bbb9d0a1c9791310e57482153efdd55a0 (patch) | |
tree | 5ab81e7bc75ca98657db186fdbacbe0f331321ed /sys | |
parent | e129a7f152187872c6eb5efb7ecc6c8b82013088 (diff) | |
download | FreeBSD-src-e0f62a1bbb9d0a1c9791310e57482153efdd55a0.zip FreeBSD-src-e0f62a1bbb9d0a1c9791310e57482153efdd55a0.tar.gz |
Fixed breakage of binary compatibility of the kern.clockrate sysctl in
sys/time.h rev.1.53, etc. Zero out the entire struct clkinfo and not
just the new spare part of it so that there is no possibility of leaking
kernel stack context to userland.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_clock.c | 1 | ||||
-rw-r--r-- | sys/sys/time.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index 92175b8..2e7ca8b 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -479,6 +479,7 @@ sysctl_kern_clockrate(SYSCTL_HANDLER_ARGS) /* * Construct clockinfo structure. */ + bzero(&clkinfo, sizeof(clkinfo)); clkinfo.hz = hz; clkinfo.tick = tick; clkinfo.profhz = profhz; diff --git a/sys/sys/time.h b/sys/sys/time.h index 5236549..5c25ece 100644 --- a/sys/sys/time.h +++ b/sys/sys/time.h @@ -255,6 +255,7 @@ struct itimerval { struct clockinfo { int hz; /* clock frequency */ int tick; /* micro-seconds per hz tick */ + int spare; int stathz; /* statistics clock frequency */ int profhz; /* profiling clock frequency */ }; |