[Trusty][SRU][PATCH 0/1] getxattr: use correct xattr length

Po-Hsu Lin po-hsu.lin at canonical.com
Wed Oct 17 04:17:43 UTC 2018


== Justification ==
This issue has been addressed in bug 1789746 for other kernels.

When the getxattr05 test in ubuntu_ltp_syscalls test suite, the test will failed with:

tag=getxattr05 stime=1539663573
cmdline="getxattr05"
contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
tst_test.c:1072: INFO: Timeout per run is 0h 05m 00s
getxattr05.c:85: PASS: Got same data when acquiring the value of system.posix_acl_access twice
getxattr05.c:80: FAIL: Got different data(00 != ffffffff) at 16
getxattr05.c:85: PASS: Got same data when acquiring the value of system.posix_acl_access twice

Summary:
passed 2
failed 1
skipped 0
warnings 0

This is caused by posix_acl_fix_xattr_to_user() being passed the total buffer size and not the actual size of the xattr as returned by vfs_getxattr().

== Fix ==
82c9a927bc5d ("getxattr: use correct xattr length")

A test kernel for Trusty could be found here:
http://people.canonical.com/~phlin/kernel/lp-1798013-getxattr05/

== Regression Potential ==
Low, this one-liner fix just passes the actual length of the xattr as returned by vfs_getxattr() down.

== Test Case ==
Run the getxattr05 test in ubuntu_ltp_syscalls test suite. And it will pass with the patched kernel.


Christian Brauner (1):
  getxattr: use correct xattr length

 fs/xattr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
1.9.1





More information about the kernel-team mailing list