From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 12949 invoked from network); 12 Nov 2020 19:32:22 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 12 Nov 2020 19:32:22 -0000 Received: (qmail 6110 invoked by uid 550); 12 Nov 2020 19:32:20 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 6087 invoked from network); 12 Nov 2020 19:32:19 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1605209528; bh=9zUXBHS/nlWiqKvsu1spVNyEvCsNm3jW6Z52uJtJzyY=; h=X-UI-Sender-Class:Date:From:To:Subject:References:In-Reply-To; b=IJuDIAcUlBtZNKFN1jHOp3zAnTSdoZ1cbF0rVgEiYNZcZ6O50zNa43CgNKDGolJYY V9TItJU0JnnIUr1giCW1DA6uZD8uTsdscu7XJxjoX9/Ypw7h71JhZcGd6ElMBNRvjM hdHzASN/C2ZShKgBfXyZN+bihHWNF9MAFFM2w7JM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Date: Thu, 12 Nov 2020 20:32:07 +0100 From: Markus Wichmann To: musl@lists.openwall.com Message-ID: <20201112193207.GC2009@voyager> References: <20201112184327.19431-1-ericonr@disroot.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20201112184327.19431-1-ericonr@disroot.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-Provags-ID: V03:K1:0SiW+wW4VmqOy2zj3fVsPrpw/POIlasKem2ryT0O/lBNuaCzYCj DXPaTVlswQBN/WY3snYNxveSUwyAxMqWu9kmRKc55aAtGI2Dw7mn/+Iv2/tBTvB20oQc65c 4ZcRlrsS5IEaH7bj1YmPMBdAGvtTAqDr/Kfi8ErwylWgc1oFQBS6kjrGiLDdaQPqBFU6PLZ FMYR4oTEBEYVLkmDc/2LA== X-UI-Out-Filterresults: notjunk:1;V03:K0:kbp9f10uuno=:2yaPMsygGJC7gU7ultNRkg kgg2gSJf/4Uff8tGcSC+w0kh6rVBew9sLVgllw5nc+CADGrtGA+9yweKgnCw0cHg25f53Qdel S7hnhQOF84LY8CYV2fg8+9EnGO0rHfC3ZOBZYHS6w0vrJWwliHnqGwj2Se98fSSHAd43XChAK 65sOXitjvsriFjuv+Qk0CwxjBgfYve3YuMcrq9APAdBcsJLm8cvyIG5BjH53YSCBpwfUteQGY 78Hqxy6uldRS9HsIQocSJUuQ1v+Xic0DVfh4ZwJo3NX3IRLiqLTZGO0FgtOcZLTwyNhKiblRs aV9fUt0ZMKwPmG6sEx2XANJVTsnKih/BlnFj3S5UkqCZUlZzBmizWmjecHkKOuSnt0feEXKEA YscvLt05wfBpr6WZmALle+p1EYNPuNilpVGwfKvoypt0TKu+pnfpIm6L/soATrWhfRMCWJ3NX WNVwY7URuLszHD22a8MzMMT1rRxpA8GmHZ4OOhvLMXsNEDIGBf+2gLDKrnuAj3/mg3T+MfaGR TZR8UgqkrH0JQdnawHcyOoyM0XsfIYJInLkfWfhSZUgjUIdRAt1Q940q9HmWExytI303BOXEI +UA5R7CPOFdodbMxiLXNP7wZFgWv2Enyud7L66WIrXZphOOb2zJJtjchm+oabmjx3YNdu9JRJ HhvcVvNjYVAmadgZ0C/DsTmK22lpy4X9t2glSU26HVlgEdn+Jj3eQQlkYqmCwjEmY6NctPYkx JjBy4SOuBshURg0a186bSzjKr6QH/1woQZOzhUMKoUCcc6+Yce3bH2EyXmjDC+PgNRqJqWLq0 9ZFUSHHVJYy0+bU89Nn+5CmOIHHiM6n9AEEeH2GTCnV78jqW7ruqejXSRAbgpLv8aLcQwBQne AZgAwu2H5ndwJKerMVDw== Subject: Re: [musl] [PATCH] fix segfault in lutimes when tv argument is NULL On Thu, Nov 12, 2020 at 03:43:27PM -0300, =C9rico Nogueira wrote: > From: =C9rico Rolim > > calling lutimes with tv=3D0 is valid if the applications wants to set th= e > timestamps to the current time. short-circuit the function to call > utimensat with times=3D0 directly if tv =3D=3D 0. > --- > > Bug reported on IRC by nmeum > > src/legacy/lutimes.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/legacy/lutimes.c b/src/legacy/lutimes.c > index 2e5502d1..22176230 100644 > --- a/src/legacy/lutimes.c > +++ b/src/legacy/lutimes.c > @@ -5,6 +5,7 @@ > > int lutimes(const char *filename, const struct timeval tv[2]) > { > + if (!tv) return utimensat(AT_FDCWD, filename, 0, AT_SYMLINK_NOFOLLOW); > struct timespec times[2]; > times[0].tv_sec =3D tv[0].tv_sec; > times[0].tv_nsec =3D tv[0].tv_usec * 1000; > -- > 2.29.2 > Deja vu. We had a similar discussion in early March. The most recent e-mail in that thread stated that the patch "might be correct as-is." Though that patch did attempt to filter out invalid inputs as well. I had pointed out that the only spec available for lutimes does state that it should act like utimes(), and utimes() does allow for NULL inputs, but there was no reply. And no follow-up from the OP, either. Ciao, Markus