Skip to content

Commit

Permalink
Check if kaddr is valid
Browse files Browse the repository at this point in the history
  • Loading branch information
JNE committed Sep 27, 2024
1 parent aebebfc commit 1b251f3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/kovid.c
Original file line number Diff line number Diff line change
Expand Up @@ -677,11 +677,16 @@ static int _proc_watchdog(void *unused) {
*/
static int _reset_tainted(void *unused) {
struct kernel_syscalls *kaddr = kv_kall_load_addr();
if (!kaddr) {
prerr("_reset_tainted: Invalid data.\n");
goto out;
}
while (!kthread_should_stop()) {
kv_reset_tainted(kaddr->tainted);
ssleep(5);
}

out:
return 0;
}

Expand Down

0 comments on commit 1b251f3

Please sign in to comment.