|
From: | Paul Eggert |
Subject: | bug#25680: [PATCH] copy: Avoid race when creating hard link over recently-created file |
Date: | Fri, 10 Feb 2017 11:55:35 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
On 02/10/2017 11:18 AM, Mike Crowe wrote:
- if (link_failed && replace && errno == EEXIST) + while (link_failed && replace && errno == EEXIST)
This could cause 'cp -f' to loop forever, if an attacker keeps creating hard links. Is this a new vulnerability? I don't recall any other way that copying from a finite source could take forever.
One possible solution would be to loop for just a few times, and then give up with a diagnostic.
[Prev in Thread] | Current Thread | [Next in Thread] |