On 7/9/2019 9:23 AM, Mark Salyzyn wrote:(annoyed that Thunderbird let me down even after selecting text plain text)
For EACCES return for getxattr, sid appears to be expected updated in parent node. For some accesses purely cosmetic for correct avc logging, and depending on kernel vintage for others (older than 4.4) the lack of the corrected sid in the parent overlay inode poisons the security cache and results in false denials.Please include the LSM (CCed) list on all LSM impacting discussions.
The avc denials would contain an (incorrect) unlabelled target references, we could fix this by copying up the sid to the parent inode. However the test (below) needs to refactored to the pleasure of the security, selinux and overlayfs maintainers. The security_socket_accept function is _close_, it will copy sid and class from the old socket to the new. Along those lines, we probably need to add a new security_copy_to_upper handler that takes the upper and lower dentries and ensures that the upper contains all the security information associated with the lower.
Your mailer mangled the patch. Please resend in plain text.
Thank you.
Prototype adjustment (tested in 3.18 to ToT)