autotest / autotest-client-tests

Autotest client tests
Other
29 stars 84 forks source link

aio_dio_bugs: fix string overflow for aio-cve-2017-10044 #115

Closed Cypresslin closed 7 years ago

Cypresslin commented 7 years ago

It was found that this test case will not work as expected on i386 systems. Which will print something like:

Permission for /[aio] is rw-s/[aio], expecting rw-s FAILED. Vulnerable to CVE-2016-10044

This issue was caused by the insufficient size of the char array and the size difference of a long integer on 32/64 bits system. Fix it by increasing the array size and use inttypes.h to secure the variable size.

Signed-off-by: Po-Hsu Lin po-hsu.lin@canonical.com

lmr commented 7 years ago

OK, sure