Check the frame pointer is within the kernel before accessing it.
This commit is contained in:
parent
48600901a8
commit
9b9266e8e7
@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/param.h>
|
||||
|
||||
#include <machine/stack.h>
|
||||
#include <machine/vmparam.h>
|
||||
|
||||
int
|
||||
unwind_frame(struct unwind_state *frame)
|
||||
@ -39,7 +40,7 @@ unwind_frame(struct unwind_state *frame)
|
||||
uint64_t fp;
|
||||
|
||||
fp = frame->fp;
|
||||
if (fp == 0)
|
||||
if (!INKERNEL(fp))
|
||||
return (-1);
|
||||
|
||||
frame->sp = fp + 0x10;
|
||||
|
Loading…
x
Reference in New Issue
Block a user