linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] smack: fix bugs: invalid unix socket label, invalid transmute attr
@ 2025-06-16  1:07 Konstantin Andreev
  2025-06-16  1:07 ` [PATCH 1/5] smack: deduplicate "does access rule request transmutation" Konstantin Andreev
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Konstantin Andreev @ 2025-06-16  1:07 UTC (permalink / raw)
  To: Casey Schaufler; +Cc: linux-security-module

Formerly, Smack inode security was initialized
by smack_d_instantiate() for all inodes,
except ones under /proc

Commit [1] imposed the sole responsibility for
initializing inode security for newly created
filesystem objects on smack_inode_init_security().

However, smack_inode_init_security() lacks some logic
present in smack_d_instantiate().

This patch series fixes 2 particular omissions
I faced directly:

1) special handling of unix socket files (5th patch)
2) S_ISDIR check for "transmute" xattr (2nd patch)

I did not check for other omissions,
but there may be ones.

Patches 1,3,4 are necessary optimizations
in smack_inode_init_security() made along the way.

I structured the changes this way to make the review
process easier.

The patch set applies on top of:
https://github.com/cschaufler/smack-next/commits/next
commit 4b59f4fd0a36

[1] 2023-11-16 roberto.sassu
commit e63d86b8b764 ("smack: Initialize the in-memory inode in smack_inode_init_security()")
Link: https://lore.kernel.org/linux-security-module/20231116090125.187209-5-roberto.sassu@huaweicloud.com/

Konstantin Andreev (5):
  smack: deduplicate "does access rule request transmutation"
  smack: fix bug: SMACK64TRANSMUTE set on non-directory
  smack: deduplicate xattr setting in smack_inode_init_security()
  smack: always "instantiate" inode in smack_inode_init_security()
  smack: fix bug: invalid label of unix socket file

 Documentation/admin-guide/LSM/Smack.rst |   5 +
 security/smack/smack_lsm.c              | 159 +++++++++++++++---------
 2 files changed, 107 insertions(+), 57 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2025-06-23 17:10 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-16  1:07 [PATCH 0/5] smack: fix bugs: invalid unix socket label, invalid transmute attr Konstantin Andreev
2025-06-16  1:07 ` [PATCH 1/5] smack: deduplicate "does access rule request transmutation" Konstantin Andreev
2025-06-16  1:07 ` [PATCH 2/5] smack: fix bug: SMACK64TRANSMUTE set on non-directory Konstantin Andreev
2025-06-16  8:42   ` Roberto Sassu
2025-06-16 11:25     ` Re[2]: " Konstantin Andreev
2025-06-16  1:07 ` [PATCH 3/5] smack: deduplicate xattr setting in smack_inode_init_security() Konstantin Andreev
2025-06-16  8:47   ` Roberto Sassu
2025-06-16  1:07 ` [PATCH 4/5] smack: always "instantiate" inode " Konstantin Andreev
2025-06-16  1:07 ` [PATCH 5/5] smack: fix bug: invalid label of unix socket file Konstantin Andreev
2025-06-16  9:05   ` Roberto Sassu
2025-06-16 11:46     ` Re[2]: " Konstantin Andreev
2025-06-16 17:11       ` Casey Schaufler
2025-06-16 17:53         ` Re[4]: " Konstantin Andreev
2025-06-16 18:36           ` Casey Schaufler
2025-06-23 17:09 ` [PATCH 0/5] smack: fix bugs: invalid unix socket label, invalid transmute attr Casey Schaufler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).