[uclibc-ng-devel] statfs call corrupts memory struct statfs too small
wbx at uclibc-ng.org
Fri Jun 29 19:32:15 CEST 2018
Geoff Levand wrote,
> I experienced seg faults due to stack corruption when
> calling statfs() with an automatic struct statfs variable.
> It seems there is a mismatch between the struct statfs used
> by libc and that used by the arm64 kernel. The call to
> statfs() writes 120 bytes, but struct statfs is only 88
> bytes. The attached test program shows this.
> Building for arm64.
> kernel: Linux-4.17.3
> Comparing these files:
> I see for the kernel all fields of struct statfs except f_fsid are the
> same length at 64 bits for arm64, and that gives 120 bytes. That differs
> from the libc version which has some 32 bit fields.
Do you have a patch in mind fixing this difference?
More information about the devel