strace-4.18 test suite: crash with _FORTIFY_SOURCE / invalidly-sized memcpy

Dmitry V. Levin ldv at altlinux.org
Thu Aug 17 12:00:31 UTC 2017


Hi,

On Wed, Aug 16, 2017 at 08:07:31PM -0500, A. Wilcox wrote:
> Dear strace developers,
> 
> We are creating a Linux distribution focused on reliability, security,
> and speed using the musl libc and a special version of fortify-headers
> created for that libc.  This fortification has caused an illegal memcpy
> in the test suite, in nlattr.c: on 64-bit platforms, 'unsigned int' can
> be 64-bits,

A 64-bit unsigned int?  Really?

> while nlhdrmsg's msg_len is a __u32 in linux/netlink.h.
> 
> The attached patch fixes this by declaring msg_len as uint32_t instead
> of unsigned int.

I guess every second "unsigned int" in strace is in fact uint32_t,
do you volunteer to identify and replace all these occurrences?


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20170817/17172b8e/attachment.bin>


More information about the Strace-devel mailing list