<div dir="ltr">there are possible race conditions on the creation of the file, e.g. if the implementation creates the /tmp/file and THEN sets the permission, rather than doing it atomically at creation time. There are also possible error handling problems such as what happens if the file already exists and belongs to malicious user, or if the file already exists and is a link to malicious user's file. In these cases, the malicious user could update the file after it has been written to.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 7, 2015 at 11:09 AM, Axel Hübl <span dir="ltr"><<a href="mailto:axel.huebl@web.de" target="_blank">axel.huebl@web.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 07.01.2015 08:51, Sven Kieske wrote:<br>
> On 07.01.2015 02:48, Axel Hübl wrote:<br>
>> Hi,<br>
><br>
>> I just found<br>
>> <a href="https://stribika.github.io/2015/01/04/secure-secure-shell.html" target="_blank">https://stribika.github.io/2015/01/04/secure-secure-shell.html</a><br>
><br>
>> with quite clear explanations.<br>
><br>
>> Especially I didn't realize there is a /etc/ssh/moduli file for the<br>
>> DH params in OpenSSH - we might want to add that, too.<br>
><br>
> This part is very insecure on systems with multiple accounts<br>
> as everyone can write to /tmp/ , resulting in an overwritten file<br>
> by a third party:<br>
><br>
>> ssh-keygen -G /tmp/moduli -b 4096 ssh-keygen -T /etc/ssh/moduli -f<br>
>> /tmp/moduli<br>
><br>
> And this person cares about security..<br>
<br>
</span>For me (debian linux),<br>
<span class=""> ssh-keygen -G /tmp/moduli -b 4096<br>
<br>
</span>creates a -rw-r--r-- file in /tmp/ with my ownership. So other users<br>
should not be able to overwrite that. Did I miss your point?<br>
<br>
An other minor is that restarting a ssh-server should not harm existing<br>
connections at all, as nervously stated in the last paragraph.<br>
<br>
nevertheless, let's focus on the interesting points, we can provide<br>
feedback to the other parts if someone feels to.<br>
<br>
Axel<br>
<br>
><br>
><br>
> kind regards<br>
><br>
> Sven<br>
<div class="HOEnZb"><div class="h5">><br>
> _______________________________________________<br>
> Ach mailing list<br>
> <a href="mailto:Ach@lists.cert.at">Ach@lists.cert.at</a><br>
> <a href="http://lists.cert.at/cgi-bin/mailman/listinfo/ach" target="_blank">http://lists.cert.at/cgi-bin/mailman/listinfo/ach</a><br>
><br>
<br>
</div></div><br>_______________________________________________<br>
Ach mailing list<br>
<a href="mailto:Ach@lists.cert.at">Ach@lists.cert.at</a><br>
<a href="http://lists.cert.at/cgi-bin/mailman/listinfo/ach" target="_blank">http://lists.cert.at/cgi-bin/mailman/listinfo/ach</a><br>
<br></blockquote></div><br></div>