[PATCH] Smack: ignore null signal in smack_task_kill

2016-04-04 Thread Rafal Krypa
en it existed, kernel returned EPERM, when it didn't - ESRCH. The only effect of policy check in such case is noise in audit logs. This change lets Smack silently ignore kill() invocations with sig == 0. Signed-off-by: Rafal Krypa --- security/smack/smack_lsm.c | 3 +++ 1 file changed, 3

[PATCH v5] Smack: limited capability for changing process label

2015-10-19 Thread Rafal Krypa
e one used for onlycap multiple labels are accepted, separated by space, which replace the previous list upon write Signed-off-by: Zbigniew Jasinski Signed-off-by: Rafal Krypa --- Documentation/security/Smack.txt | 10 ++ security/smack/smack.h | 4 +- security/smack/smack_acc

[PATCH v4] Smack: limited capability for changing process label

2015-10-14 Thread Rafal Krypa
urity/Smack.txt Changes in v3: * squashed into one commit Changes in v4: * switch from global list to per-task list * since the per-task list is accessed only by the task itself there is no need to use synchronization mechanisms on it Signed-off-by: Zbigniew Jasinski Signed-off-by: Rafal

[PATCH 2/2 v2] Smack: allow multiple labels in onlycap

2015-06-02 Thread Rafal Krypa
running them all with a single label is not always practical. This patch extends onlycap feature for multiple labels. They are configured in the same smackfs "onlycap" interface, separated by spaces. Signed-off-by: Rafal Krypa --- Documentation/security/Smack.txt | 6 +- security/sma

[PATCH 1/2] Smack: fix seq operations in smackfs

2015-05-21 Thread Rafal Krypa
;] userspace+0x442/0x548 [<6001aa77>] ? interrupt_end+0x0/0x80 [<6001daae>] ? copy_chunk_to_user+0x0/0x2b [<6002cb6b>] ? save_registers+0x1f/0x39 [<60032ef7>] ? arch_prctl+0xf5/0x170 [<6001a92d>] fork_handler+0x85/0x87 Signed-off-by: Rafal Krypa --- security/s

[PATCH 2/2] Smack: allow multiple labels in onlycap

2015-05-21 Thread Rafal Krypa
running them all with a single label is not always practical. This patch extends onlycap feature for multiple labels. They are configured in the same smackfs "onlycap" interface, separated by spaces. Signed-off-by: Rafal Krypa --- Documentation/security/Smack.txt | 6 +- security/sma

[PATCH 0/2] Smack: allow multiple labels in onlycap

2015-05-21 Thread Rafal Krypa
critical sections. Failing to do that could lead to memory races and undefined behaviour in smackfs. As a bonus, first patch also fixes a bug in smackfs that was found by coincidence. Rafal Krypa (2): Smack: fix seq operations in smackfs Smack: allow multiple labels in onlycap Documentation

[PATCH] smack: Add missing logging in bidirectional UDS connect check

2015-01-08 Thread Rafal Krypa
During UDS connection check, both sides are checked for write access to the other side. But only the first check is performed with audit support. The second one didn't produce any audit logs. This simple patch fixes that. Signed-off-by: Rafal Krypa --- security/smack/smack_lsm.c | 2 +- 1

[PATCH] Smack: fix bug with empty label causing memory read beyond range

2014-05-29 Thread Rafal Krypa
terminated. During investigation of all other calls leading to smk_parse_smack() another similar issue was found in smk_write_onlycap(). This patch fixes both cases by ensuring that smk_parse_smack() by handling of zero-length labels. Signed-off-by: Rafal Krypa --- security/smack/smack_lsm

[PATCH] Smack: parse multiple rules per write to load2, up to PAGE_SIZE-1 bytes

2013-08-09 Thread Rafal Krypa
characters and properly return number of processed bytes. In case when user buffer is larger, it will be additionally truncated. All characters after last \n will not get parsed to avoid partial rule near input buffer boundary. Signed-off-by: Rafal Krypa --- security/smack/smackfs.c | 167

[PATCHv2] Smack: add support for modification of existing rules

2013-01-10 Thread Rafal Krypa
. This way was inefficient, non-atomic and unnecessarily difficult. New interface is intended to ease such modifications. Changes in v2: - dropped patches for smackfs seq list operations - changed modification approach to simple integer assignment Rafal Krypa (1): Smack: add support for modification

[PATCHv2] Smack: add support for modification of existing rules

2013-01-10 Thread Rafal Krypa
ermissions will be left unchanged. If no rule previously existed, it will be created. Targeted for git://git.gitorious.org/smack-next/kernel.git Signed-off-by: Rafal Krypa --- Documentation/security/Smack.txt | 11 ++ security/smack/smackfs.c | 249 ++---

[PATCHv2] Smack: add support for modification of existing rules

2012-11-28 Thread Rafal Krypa
. This way was inefficient, non-atomic and unnecessarily difficult. New interface is intended to ease such modifications. Changes in v2: - dropped patches for smackfs seq list operations - changed modification approach to simple integer assignment Rafal Krypa (1): Smack: add support for

[PATCH] Smack: add support for modification of existing rules

2012-11-28 Thread Rafal Krypa
ermissions will be left unchanged. If no rule previously existed, it will be created. Targeted for git://git.gitorious.org/smack-next/kernel.git Signed-off-by: Rafal Krypa --- Documentation/security/Smack.txt | 11 ++ security/smack/smackfs.c | 249 ++---

[PATCH 3/3] Smack: add support for modification of existing rules

2012-11-27 Thread Rafal Krypa
ermissions will be left unchanged. If no rule previously existed, it will be created. Targeted for git://git.gitorious.org/smack-next/kernel.git Signed-off-by: Rafal Krypa --- Documentation/security/Smack.txt | 11 ++ security/smack/smackfs.c | 219 +++--

[PATCH 2/3] Smack: remove global master list of rules

2012-11-27 Thread Rafal Krypa
master list. Appropriate seq_file functions have been rewritten. Targeted for git://git.gitorious.org/smack-next/kernel.git Signed-off-by: Rafal Krypa --- security/smack/smackfs.c | 101 +- 1 file changed, 54 insertions(+), 47 deletions(-) diff --git a

[PATCH 1/3] Smack: use RCU functions and read locking in smackfs seq list operations

2012-11-27 Thread Rafal Krypa
Targeted for git://git.gitorious.org/smack-next/kernel.git Signed-off-by: Rafal Krypa --- security/smack/smackfs.c | 50 +++--- 1 file changed, 20 insertions(+), 30 deletions(-) diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c index

[PATCH 0/3] Smack: add support for modification of existing rules, restructure rules list showing in smackfs

2012-11-27 Thread Rafal Krypa
smackfs seq operations code. 3. Add support for modification of existing rules The actual patch with new interface. A previous version of this one has posted previously (http://thread.gmane.org/gmane.linux.documentation/6759), but was proven to be wrong. Rafal Krypa (3): Smack: use RCU

[PATCH] Smack: add missing support for transmute bit in smack_str_from_perm()

2012-11-27 Thread Rafal Krypa
This fixes audit logs for granting or denial of permissions to show information about transmute bit. Targeted for git://git.gitorious.org/smack-next/kernel.git Signed-off-by: Rafal Krypa --- security/smack/smack_access.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/security/smack

[PATCH] Smack: prevent revoke-subject from failing when unseen label is written to it

2012-11-27 Thread Rafal Krypa
Special file /smack/revoke-subject will silently accept labels that are not present on the subject label list. Nothing has to be done for such labels, as there are no rules for them to revoke. Targeted for git://git.gitorious.org/smack-next/kernel.git Signed-off-by: Rafal Krypa --- security

[PATCH] Smack: add support for modification of existing rules

2012-09-17 Thread Rafal Krypa
ermissions will be left unchanged. If no rule previously existed, it will be created. Targeted for git://git.gitorious.org/smack-next/kernel.git Signed-off-by: Rafal Krypa --- Documentation/security/Smack.txt | 11 +++ security/smack/smackfs.c | 152 ---

[PATCH] Smack: implement revoking all rules for a subject label

2012-07-11 Thread Rafal Krypa
Add /smack/revoke-subject special file. Writing a SMACK label to this file will set the access to '-' for all access rules with that subject label. Targeted for git://git.gitorious.org/smack-next/kernel.git Signed-off-by: Rafal Krypa --- Documentation/security/Smack.txt |3 ++

[PATCH] Smack: don't show empty rules when /smack/load or /smack/load2 is read

2012-07-09 Thread Rafal Krypa
ted when /smack/load or /smack/load2 is read. This may cause clutter if many rules were disabled. As a rule with access set to '-' is equivalent to no rule at all, they may be safely hidden from the listing. Targeted for git://git.gitorious.org/smack-next/kernel.git Signed-off-by: Ra