Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Fix an uninitialized pointer deref introduced in re...



details:   https://anonhg.NetBSD.org/src/rev/5feba4ee69be
branches:  trunk
changeset: 946702:5feba4ee69be
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Dec 06 13:45:58 2020 +0000

description:
Fix an uninitialized pointer deref introduced in rev 1.207.

Reported-by: syzbot+6d69101d5f2fd954c4e2%syzkaller.appspotmail.com@localhost

diffstat:

 sys/kern/kern_time.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (45 lines):

diff -r 275b4a7a959b -r 5feba4ee69be sys/kern/kern_time.c
--- a/sys/kern/kern_time.c      Sun Dec 06 13:29:34 2020 +0000
+++ b/sys/kern/kern_time.c      Sun Dec 06 13:45:58 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_time.c,v 1.207 2020/12/05 18:17:01 thorpej Exp $  */
+/*     $NetBSD: kern_time.c,v 1.208 2020/12/06 13:45:58 thorpej Exp $  */
 
 /*-
  * Copyright (c) 2000, 2004, 2005, 2007, 2008, 2009, 2020
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.207 2020/12/05 18:17:01 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.208 2020/12/06 13:45:58 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/resourcevar.h>
@@ -1243,10 +1243,10 @@
 
        switch (id) {
        case CLOCK_VIRTUAL:
-               itl = &pt->pt_proc->p_timers->pts_virtual;
+               itl = &pts->pts_virtual;
                break;
        case CLOCK_PROF:
-               itl = &pt->pt_proc->p_timers->pts_prof;
+               itl = &pts->pts_prof;
                break;
        default:
                itl = NULL;
@@ -1642,11 +1642,11 @@
                        pt->pt_ev.sigev_signo = SIGALRM;
                        break;
                case ITIMER_VIRTUAL:
-                       itl = &pt->pt_proc->p_timers->pts_virtual;
+                       itl = &pts->pts_virtual;
                        pt->pt_ev.sigev_signo = SIGVTALRM;
                        break;
                case ITIMER_PROF:
-                       itl = &pt->pt_proc->p_timers->pts_prof;
+                       itl = &pts->pts_prof;
                        pt->pt_ev.sigev_signo = SIGPROF;
                        break;
                }



Home | Main Index | Thread Index | Old Index