diff options
Diffstat (limited to 'security')
| -rw-r--r-- | security/Kconfig | 1 | ||||
| -rw-r--r-- | security/Kconfig.hardening | 1 | ||||
| -rw-r--r-- | security/apparmor/Kconfig | 1 | ||||
| -rw-r--r-- | security/integrity/Kconfig | 1 | ||||
| -rw-r--r-- | security/integrity/evm/Kconfig | 1 | ||||
| -rw-r--r-- | security/integrity/evm/Makefile | 1 | ||||
| -rw-r--r-- | security/integrity/ima/Kconfig | 1 | ||||
| -rw-r--r-- | security/keys/Kconfig | 1 | ||||
| -rw-r--r-- | security/keys/big_key.c | 6 | ||||
| -rw-r--r-- | security/keys/gc.c | 6 | ||||
| -rw-r--r-- | security/keys/keyctl_pkey.c | 6 | ||||
| -rw-r--r-- | security/keys/persistent.c | 6 | ||||
| -rw-r--r-- | security/keys/sysctl.c | 6 | ||||
| -rw-r--r-- | security/loadpin/Kconfig | 1 | ||||
| -rw-r--r-- | security/loadpin/Makefile | 1 | ||||
| -rw-r--r-- | security/safesetid/Kconfig | 1 | ||||
| -rw-r--r-- | security/selinux/Kconfig | 1 | ||||
| -rw-r--r-- | security/selinux/hooks.c | 10 | ||||
| -rw-r--r-- | security/selinux/include/netlabel.h | 16 | ||||
| -rw-r--r-- | security/selinux/netlabel.c | 16 | ||||
| -rw-r--r-- | security/smack/Kconfig | 1 | ||||
| -rw-r--r-- | security/smack/Makefile | 1 | ||||
| -rw-r--r-- | security/tomoyo/Kconfig | 1 | ||||
| -rw-r--r-- | security/yama/Kconfig | 1 | ||||
| -rw-r--r-- | security/yama/Makefile | 1 |
25 files changed, 32 insertions, 57 deletions
diff --git a/security/Kconfig b/security/Kconfig index aeac3676dd4d..466cc1f8ffed 100644 --- a/security/Kconfig +++ b/security/Kconfig | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 1 | # | 2 | # |
| 2 | # Security configuration | 3 | # Security configuration |
| 3 | # | 4 | # |
diff --git a/security/Kconfig.hardening b/security/Kconfig.hardening index 0a1d4ca314f4..c6cb2d9b2905 100644 --- a/security/Kconfig.hardening +++ b/security/Kconfig.hardening | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 1 | menu "Kernel hardening options" | 2 | menu "Kernel hardening options" |
| 2 | 3 | ||
| 3 | config GCC_PLUGIN_STRUCTLEAK | 4 | config GCC_PLUGIN_STRUCTLEAK |
diff --git a/security/apparmor/Kconfig b/security/apparmor/Kconfig index 3de21f46c82a..d8b1a360a636 100644 --- a/security/apparmor/Kconfig +++ b/security/apparmor/Kconfig | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 1 | config SECURITY_APPARMOR | 2 | config SECURITY_APPARMOR |
| 2 | bool "AppArmor support" | 3 | bool "AppArmor support" |
| 3 | depends on SECURITY && NET | 4 | depends on SECURITY && NET |
diff --git a/security/integrity/Kconfig b/security/integrity/Kconfig index 3ba1168b1756..c352532b8f84 100644 --- a/security/integrity/Kconfig +++ b/security/integrity/Kconfig | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 1 | # | 2 | # |
| 2 | config INTEGRITY | 3 | config INTEGRITY |
| 3 | bool "Integrity subsystem" | 4 | bool "Integrity subsystem" |
diff --git a/security/integrity/evm/Kconfig b/security/integrity/evm/Kconfig index 60221852b26a..a6e19d23e700 100644 --- a/security/integrity/evm/Kconfig +++ b/security/integrity/evm/Kconfig | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 1 | config EVM | 2 | config EVM |
| 2 | bool "EVM support" | 3 | bool "EVM support" |
| 3 | select KEYS | 4 | select KEYS |
diff --git a/security/integrity/evm/Makefile b/security/integrity/evm/Makefile index 7393c415a066..a56f5613be79 100644 --- a/security/integrity/evm/Makefile +++ b/security/integrity/evm/Makefile | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 1 | # | 2 | # |
| 2 | # Makefile for building the Extended Verification Module(EVM) | 3 | # Makefile for building the Extended Verification Module(EVM) |
| 3 | # | 4 | # |
diff --git a/security/integrity/ima/Kconfig b/security/integrity/ima/Kconfig index a18f8c6d13b5..2692c7358c2c 100644 --- a/security/integrity/ima/Kconfig +++ b/security/integrity/ima/Kconfig | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 1 | # IBM Integrity Measurement Architecture | 2 | # IBM Integrity Measurement Architecture |
| 2 | # | 3 | # |
| 3 | config IMA | 4 | config IMA |
diff --git a/security/keys/Kconfig b/security/keys/Kconfig index 6462e6654ccf..ee502e4d390b 100644 --- a/security/keys/Kconfig +++ b/security/keys/Kconfig | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 1 | # | 2 | # |
| 2 | # Key management configuration | 3 | # Key management configuration |
| 3 | # | 4 | # |
diff --git a/security/keys/big_key.c b/security/keys/big_key.c index 2806e70d7f8f..001abe530a0d 100644 --- a/security/keys/big_key.c +++ b/security/keys/big_key.c | |||
| @@ -1,13 +1,9 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 1 | /* Large capacity key type | 2 | /* Large capacity key type |
| 2 | * | 3 | * |
| 3 | * Copyright (C) 2017 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. | 4 | * Copyright (C) 2017 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. |
| 4 | * Copyright (C) 2013 Red Hat, Inc. All Rights Reserved. | 5 | * Copyright (C) 2013 Red Hat, Inc. All Rights Reserved. |
| 5 | * Written by David Howells (dhowells@redhat.com) | 6 | * Written by David Howells (dhowells@redhat.com) |
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or | ||
| 8 | * modify it under the terms of the GNU General Public Licence | ||
| 9 | * as published by the Free Software Foundation; either version | ||
| 10 | * 2 of the Licence, or (at your option) any later version. | ||
| 11 | */ | 7 | */ |
| 12 | 8 | ||
| 13 | #define pr_fmt(fmt) "big_key: "fmt | 9 | #define pr_fmt(fmt) "big_key: "fmt |
diff --git a/security/keys/gc.c b/security/keys/gc.c index 634e96b380e8..44e58a3e5663 100644 --- a/security/keys/gc.c +++ b/security/keys/gc.c | |||
| @@ -1,12 +1,8 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 1 | /* Key garbage collector | 2 | /* Key garbage collector |
| 2 | * | 3 | * |
| 3 | * Copyright (C) 2009-2011 Red Hat, Inc. All Rights Reserved. | 4 | * Copyright (C) 2009-2011 Red Hat, Inc. All Rights Reserved. |
| 4 | * Written by David Howells (dhowells@redhat.com) | 5 | * Written by David Howells (dhowells@redhat.com) |
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of the GNU General Public Licence | ||
| 8 | * as published by the Free Software Foundation; either version | ||
| 9 | * 2 of the Licence, or (at your option) any later version. | ||
| 10 | */ | 6 | */ |
| 11 | 7 | ||
| 12 | #include <linux/slab.h> | 8 | #include <linux/slab.h> |
diff --git a/security/keys/keyctl_pkey.c b/security/keys/keyctl_pkey.c index 8bdea5abad11..931d8dfb4a7f 100644 --- a/security/keys/keyctl_pkey.c +++ b/security/keys/keyctl_pkey.c | |||
| @@ -1,12 +1,8 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 1 | /* Public-key operation keyctls | 2 | /* Public-key operation keyctls |
| 2 | * | 3 | * |
| 3 | * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved. | 4 | * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved. |
| 4 | * Written by David Howells (dhowells@redhat.com) | 5 | * Written by David Howells (dhowells@redhat.com) |
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of the GNU General Public Licence | ||
| 8 | * as published by the Free Software Foundation; either version | ||
| 9 | * 2 of the Licence, or (at your option) any later version. | ||
| 10 | */ | 6 | */ |
| 11 | 7 | ||
| 12 | #include <linux/slab.h> | 8 | #include <linux/slab.h> |
diff --git a/security/keys/persistent.c b/security/keys/persistent.c index d0cb5b32eff7..da9a0f42b795 100644 --- a/security/keys/persistent.c +++ b/security/keys/persistent.c | |||
| @@ -1,12 +1,8 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 1 | /* General persistent per-UID keyrings register | 2 | /* General persistent per-UID keyrings register |
| 2 | * | 3 | * |
| 3 | * Copyright (C) 2013 Red Hat, Inc. All Rights Reserved. | 4 | * Copyright (C) 2013 Red Hat, Inc. All Rights Reserved. |
| 4 | * Written by David Howells (dhowells@redhat.com) | 5 | * Written by David Howells (dhowells@redhat.com) |
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of the GNU General Public Licence | ||
| 8 | * as published by the Free Software Foundation; either version | ||
| 9 | * 2 of the Licence, or (at your option) any later version. | ||
| 10 | */ | 6 | */ |
| 11 | 7 | ||
| 12 | #include <linux/user_namespace.h> | 8 | #include <linux/user_namespace.h> |
diff --git a/security/keys/sysctl.c b/security/keys/sysctl.c index b68faa1a5cfd..dd1e21fab827 100644 --- a/security/keys/sysctl.c +++ b/security/keys/sysctl.c | |||
| @@ -1,12 +1,8 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 1 | /* Key management controls | 2 | /* Key management controls |
| 2 | * | 3 | * |
| 3 | * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved. | 4 | * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved. |
| 4 | * Written by David Howells (dhowells@redhat.com) | 5 | * Written by David Howells (dhowells@redhat.com) |
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of the GNU General Public Licence | ||
| 8 | * as published by the Free Software Foundation; either version | ||
| 9 | * 2 of the Licence, or (at your option) any later version. | ||
| 10 | */ | 6 | */ |
| 11 | 7 | ||
| 12 | #include <linux/key.h> | 8 | #include <linux/key.h> |
diff --git a/security/loadpin/Kconfig b/security/loadpin/Kconfig index a0d70d82b98e..91be65dec2ab 100644 --- a/security/loadpin/Kconfig +++ b/security/loadpin/Kconfig | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 1 | config SECURITY_LOADPIN | 2 | config SECURITY_LOADPIN |
| 2 | bool "Pin load of kernel files (modules, fw, etc) to one filesystem" | 3 | bool "Pin load of kernel files (modules, fw, etc) to one filesystem" |
| 3 | depends on SECURITY && BLOCK | 4 | depends on SECURITY && BLOCK |
diff --git a/security/loadpin/Makefile b/security/loadpin/Makefile index c2d77f83037b..0ead1c3105fd 100644 --- a/security/loadpin/Makefile +++ b/security/loadpin/Makefile | |||
| @@ -1 +1,2 @@ | |||
| 1 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 1 | obj-$(CONFIG_SECURITY_LOADPIN) += loadpin.o | 2 | obj-$(CONFIG_SECURITY_LOADPIN) += loadpin.o |
diff --git a/security/safesetid/Kconfig b/security/safesetid/Kconfig index 4f415c4e3f93..18b5fb90417b 100644 --- a/security/safesetid/Kconfig +++ b/security/safesetid/Kconfig | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 1 | config SECURITY_SAFESETID | 2 | config SECURITY_SAFESETID |
| 2 | bool "Gate setid transitions to limit CAP_SET{U/G}ID capabilities" | 3 | bool "Gate setid transitions to limit CAP_SET{U/G}ID capabilities" |
| 3 | depends on SECURITY | 4 | depends on SECURITY |
diff --git a/security/selinux/Kconfig b/security/selinux/Kconfig index 55f032f1fc2d..5711689deb6a 100644 --- a/security/selinux/Kconfig +++ b/security/selinux/Kconfig | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 1 | config SECURITY_SELINUX | 2 | config SECURITY_SELINUX |
| 2 | bool "NSA SELinux Support" | 3 | bool "NSA SELinux Support" |
| 3 | depends on SECURITY_NETWORK && AUDIT && NET && INET | 4 | depends on SECURITY_NETWORK && AUDIT && NET && INET |
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index c61787b15f27..3ec702cf46ca 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
| @@ -4637,6 +4637,14 @@ static int selinux_socket_connect_helper(struct socket *sock, | |||
| 4637 | err = sock_has_perm(sk, SOCKET__CONNECT); | 4637 | err = sock_has_perm(sk, SOCKET__CONNECT); |
| 4638 | if (err) | 4638 | if (err) |
| 4639 | return err; | 4639 | return err; |
| 4640 | if (addrlen < offsetofend(struct sockaddr, sa_family)) | ||
| 4641 | return -EINVAL; | ||
| 4642 | |||
| 4643 | /* connect(AF_UNSPEC) has special handling, as it is a documented | ||
| 4644 | * way to disconnect the socket | ||
| 4645 | */ | ||
| 4646 | if (address->sa_family == AF_UNSPEC) | ||
| 4647 | return 0; | ||
| 4640 | 4648 | ||
| 4641 | /* | 4649 | /* |
| 4642 | * If a TCP, DCCP or SCTP socket, check name_connect permission | 4650 | * If a TCP, DCCP or SCTP socket, check name_connect permission |
| @@ -4657,8 +4665,6 @@ static int selinux_socket_connect_helper(struct socket *sock, | |||
| 4657 | * need to check address->sa_family as it is possible to have | 4665 | * need to check address->sa_family as it is possible to have |
| 4658 | * sk->sk_family = PF_INET6 with addr->sa_family = AF_INET. | 4666 | * sk->sk_family = PF_INET6 with addr->sa_family = AF_INET. |
| 4659 | */ | 4667 | */ |
| 4660 | if (addrlen < offsetofend(struct sockaddr, sa_family)) | ||
| 4661 | return -EINVAL; | ||
| 4662 | switch (address->sa_family) { | 4668 | switch (address->sa_family) { |
| 4663 | case AF_INET: | 4669 | case AF_INET: |
| 4664 | addr4 = (struct sockaddr_in *)address; | 4670 | addr4 = (struct sockaddr_in *)address; |
diff --git a/security/selinux/include/netlabel.h b/security/selinux/include/netlabel.h index 8671de09c363..d30d8d7cdc9c 100644 --- a/security/selinux/include/netlabel.h +++ b/security/selinux/include/netlabel.h | |||
| @@ -1,26 +1,12 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ | ||
| 1 | /* | 2 | /* |
| 2 | * SELinux interface to the NetLabel subsystem | 3 | * SELinux interface to the NetLabel subsystem |
| 3 | * | 4 | * |
| 4 | * Author: Paul Moore <paul@paul-moore.com> | 5 | * Author: Paul Moore <paul@paul-moore.com> |
| 5 | * | ||
| 6 | */ | 6 | */ |
| 7 | 7 | ||
| 8 | /* | 8 | /* |
| 9 | * (c) Copyright Hewlett-Packard Development Company, L.P., 2006 | 9 | * (c) Copyright Hewlett-Packard Development Company, L.P., 2006 |
| 10 | * | ||
| 11 | * This program is free software; you can redistribute it and/or modify | ||
| 12 | * it under the terms of the GNU General Public License as published by | ||
| 13 | * the Free Software Foundation; either version 2 of the License, or | ||
| 14 | * (at your option) any later version. | ||
| 15 | * | ||
| 16 | * This program is distributed in the hope that it will be useful, | ||
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | ||
| 19 | * the GNU General Public License for more details. | ||
| 20 | * | ||
| 21 | * You should have received a copy of the GNU General Public License | ||
| 22 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 23 | * | ||
| 24 | */ | 10 | */ |
| 25 | 11 | ||
| 26 | #ifndef _SELINUX_NETLABEL_H_ | 12 | #ifndef _SELINUX_NETLABEL_H_ |
diff --git a/security/selinux/netlabel.c b/security/selinux/netlabel.c index 6fd9954e1c08..abaab7683840 100644 --- a/security/selinux/netlabel.c +++ b/security/selinux/netlabel.c | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 1 | /* | 2 | /* |
| 2 | * SELinux NetLabel Support | 3 | * SELinux NetLabel Support |
| 3 | * | 4 | * |
| @@ -5,25 +6,10 @@ | |||
| 5 | * subsystem. | 6 | * subsystem. |
| 6 | * | 7 | * |
| 7 | * Author: Paul Moore <paul@paul-moore.com> | 8 | * Author: Paul Moore <paul@paul-moore.com> |
| 8 | * | ||
| 9 | */ | 9 | */ |
| 10 | 10 | ||
| 11 | /* | 11 | /* |
| 12 | * (c) Copyright Hewlett-Packard Development Company, L.P., 2007, 2008 | 12 | * (c) Copyright Hewlett-Packard Development Company, L.P., 2007, 2008 |
| 13 | * | ||
| 14 | * This program is free software; you can redistribute it and/or modify | ||
| 15 | * it under the terms of the GNU General Public License as published by | ||
| 16 | * the Free Software Foundation; either version 2 of the License, or | ||
| 17 | * (at your option) any later version. | ||
| 18 | * | ||
| 19 | * This program is distributed in the hope that it will be useful, | ||
| 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | ||
| 22 | * the GNU General Public License for more details. | ||
| 23 | * | ||
| 24 | * You should have received a copy of the GNU General Public License | ||
| 25 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 26 | * | ||
| 27 | */ | 13 | */ |
| 28 | 14 | ||
| 29 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
diff --git a/security/smack/Kconfig b/security/smack/Kconfig index 923b120e0fa5..5a8dfad469c3 100644 --- a/security/smack/Kconfig +++ b/security/smack/Kconfig | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 1 | config SECURITY_SMACK | 2 | config SECURITY_SMACK |
| 2 | bool "Simplified Mandatory Access Control Kernel Support" | 3 | bool "Simplified Mandatory Access Control Kernel Support" |
| 3 | depends on NET | 4 | depends on NET |
diff --git a/security/smack/Makefile b/security/smack/Makefile index ee2ebd504541..6dbf6e22a68b 100644 --- a/security/smack/Makefile +++ b/security/smack/Makefile | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 1 | # | 2 | # |
| 2 | # Makefile for the SMACK LSM | 3 | # Makefile for the SMACK LSM |
| 3 | # | 4 | # |
diff --git a/security/tomoyo/Kconfig b/security/tomoyo/Kconfig index a00ab7eb6181..9221ea506631 100644 --- a/security/tomoyo/Kconfig +++ b/security/tomoyo/Kconfig | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 1 | config SECURITY_TOMOYO | 2 | config SECURITY_TOMOYO |
| 2 | bool "TOMOYO Linux Support" | 3 | bool "TOMOYO Linux Support" |
| 3 | depends on SECURITY | 4 | depends on SECURITY |
diff --git a/security/yama/Kconfig b/security/yama/Kconfig index 96b27405558a..a810304123ca 100644 --- a/security/yama/Kconfig +++ b/security/yama/Kconfig | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 1 | config SECURITY_YAMA | 2 | config SECURITY_YAMA |
| 2 | bool "Yama support" | 3 | bool "Yama support" |
| 3 | depends on SECURITY | 4 | depends on SECURITY |
diff --git a/security/yama/Makefile b/security/yama/Makefile index 8b5e06588456..0fa5d0fe2cf6 100644 --- a/security/yama/Makefile +++ b/security/yama/Makefile | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 1 | obj-$(CONFIG_SECURITY_YAMA) := yama.o | 2 | obj-$(CONFIG_SECURITY_YAMA) := yama.o |
| 2 | 3 | ||
| 3 | yama-y := yama_lsm.o | 4 | yama-y := yama_lsm.o |
