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.
This commit is contained in:
parent
f318190a01
commit
a9a0f15a69
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=96052
@ -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;
|
||||
|
@ -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 */
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user