lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 9 Dec 2017 19:24:35 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     LKML <linux-kernel@...r.kernel.org>
cc:     Linus Torvalds <torvalds@...uxfoundation.org>, x86@...nel.org,
        Peter Zijlstra <peterz@...radead.org>,
        Andy Lutomirski <luto@...nel.org>,
        Borislav Petkov <bp@...en8.de>,
        Brian Gerst <brgerst@...il.com>,
        David Laight <David.Laight@...lab.com>,
        Kees Cook <keescook@...omium.org>
Subject: Re: [patch V2 2/2] x86/ldt: Prevent ldt inheritance on exec

On Fri, 8 Dec 2017, Thomas Gleixner wrote:
> +int ldt_dup_context(struct mm_struct *old_mm, struct mm_struct *mm)
>  {
>  	struct ldt_struct *new_ldt;
> -	struct mm_struct *old_mm;
>  	int retval = 0;
>  
> -	mutex_init(&mm->context.lock);
> -	old_mm = current->mm;
> -	if (!old_mm) {
> -		mm->context.ldt = NULL;
> +	if (!old_mm)
>  		return 0;
> -	}
>  
>  	mutex_lock(&old_mm->context.lock);

Bah. That's broken. It now nests into old_mm->mmap_sem which is the reverse
lock order than in ldt_write. Will fix.

Thanks,

	tglx


Powered by blists - more mailing lists