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] [day] [month] [year] [list]
Message-ID: <622e4440-a328-2785-fb77-9a77c5b000df@suse.de>
Date:   Wed, 21 Dec 2016 16:04:04 +1100
From:   Aleksa Sarai <asarai@...e.de>
To:     Oleg Nesterov <oleg@...hat.com>
Cc:     viro@...iv.linux.org.uk, ebiederm@...ssion.com,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        cyphar@...har.com, dev@...ncontainers.org
Subject: Re: [PATCH] fs: exec: apply CLOEXEC before changing dumpable task
 flags

>> @@ -1287,6 +1287,13 @@ void setup_new_exec(struct linux_binprm * bprm)
>>  	/* This is the point of no return */
>>  	current->sas_ss_sp = current->sas_ss_size = 0;
>>
>> +	/*
>> +	 * We have to apply CLOEXEC before we change whether the process is
>> +	 * dumpable to avoid a race with a process in userspace trying to access
>> +	 * the should-be-closed file descriptors of a process undergoing exec(2).
>> +	 */
>> +	do_close_on_exec(current->files);
>
> Cosmetic, but perhaps this should go into flush_old_exec() then?

Yeah, I was thinking the same thing. Also, I'll cc stable (v3.2+) to the 
patch.

-- 
Aleksa Sarai
Software Engineer (Containers)
SUSE Linux GmbH
https://www.cyphar.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ