Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Date: Mon, 10 Jul 2017 14:09:07 +0000
From: Pascal Cuoq <cuoq@...st-in-soft.com>
To: "musl@...ts.openwall.com" <musl@...ts.openwall.com>
Subject: strlen strict-aliasing-safe GCC version

Hello,

the attached patch fixes a strict aliasing violation in strlen. The same GCC extension used in this patch is already used in musl's memcpy and memset functions.

In musl's memcpy and memset, the entire optimized version of the function is contained in #ifdef __GNUC__. This patch follows the same approach.

On my x86-64 Ubuntu, strlen.c compiles after the patch is applied and produces the same object file as before.

PS: strlen in its optimized version also makes an out-of-bounds access for some inputs. This is already known: http://www.openwall.com/lists/musl/2013/06/16/7
I do not have a fix for that, but I left a comment in the source code.

Pascal


Download attachment "strlen_sa.patch" of type "application/octet-stream" (737 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.