git: kernel - fix crash in smb mount

Nicolas Thery nth at crater.dragonflybsd.org
Sat Jul 10 02:04:11 PDT 2010


commit be36369df85afceebd0c8caca4b22f6e7a147f4f
Author: Nicolas Thery <nthery at gmail.com>
Date:   Sat Jul 10 10:43:31 2010 +0200

    kernel - fix crash in smb mount
    
    The samba kernel-side daemon smbiod is created with
    kthread_create_compat().
    
    Kernel threads created with kthread_create_compat() have no td_ucred, as
    other kernel threads, but have td_proc != NULL because this function
    under the hood forks the process 0.
    
    prison_replace_wildcard() was assuming that if td_proc != NULL it is
    dealing with a user thread that has a valid td_ucred thus causing a NULL
    ptr dereference when operating on kthread_create_compat()-threads.
    
    Reported-and-fixed-by: Tero Jaasko
    Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1790>

Summary of changes:
 sys/kern/kern_jail.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/be36369df85afceebd0c8caca4b22f6e7a147f4f


-- 
DragonFly BSD source repository





More information about the Commits mailing list