You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear SMACK team,
I met the issue with SMACK transmute function with ubifs file system: Snerio:
Add access label and transmute label for directory: chsmack -a "Object" -t
Add rule "t" for subject, such as "Subject Object rwxat"
When subject create a file in directory -> file have smack label (from parent directory) -> PASS
But when subject create a folder in directory -> folder have smack label (parent directory), but don't have transmute label -> FAIL
Then Ubifs assert failed -> assert action (alway switch to read-only) happend:
[ 32.638124 01-01 00:00:35.501] UBIFS error (ubi4:3 pid 1307): ubifs_assert_failed: UBIFS assert failed: inode_is_locked(host), in fs/ubifs/xattr.c:276
Please include the LSM email list [email protected] and the Smack kernel maintainer [email protected] on the patch. If you don't feel up to sending the patch, we can produce a version and add you on a suggested-by tag. Let me know how you'd like to proceed.
Dear SMACK team,
I met the issue with SMACK transmute function with ubifs file system:
Snerio:
Then Ubifs assert failed -> assert action (alway switch to read-only) happend:
[ 32.638124 01-01 00:00:35.501] UBIFS error (ubi4:3 pid 1307): ubifs_assert_failed: UBIFS assert failed: inode_is_locked(host), in fs/ubifs/xattr.c:276
Summary:
parent_directory access="Object" transmute="True"
|--- file access="Object"
|--- child_directory access="Object" (dont have transmute="True")
I checked and the cause from this patch:
https://lore.kernel.org/lkml/[email protected]/T/
They add check_lock, but from ubifs_mkdir -> d_instantiate(dentry, inode); -> security_d_instantiate, new inode has never been locked.
So I add inode lock in smack_d_instantiate and this bug resolve:
Do you agree with it ?
Let me know your opinion !!
Thank you!
The text was updated successfully, but these errors were encountered: