Skip to content

Commit bb2cbf5

Browse files
committed
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull security subsystem updates from James Morris: "In this release: - PKCS#7 parser for the key management subsystem from David Howells - appoint Kees Cook as seccomp maintainer - bugfixes and general maintenance across the subsystem" * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (94 commits) X.509: Need to export x509_request_asymmetric_key() netlabel: shorter names for the NetLabel catmap funcs/structs netlabel: fix the catmap walking functions netlabel: fix the horribly broken catmap functions netlabel: fix a problem when setting bits below the previously lowest bit PKCS#7: X.509 certificate issuer and subject are mandatory fields in the ASN.1 tpm: simplify code by using %*phN specifier tpm: Provide a generic means to override the chip returned timeouts tpm: missing tpm_chip_put in tpm_get_random() tpm: Properly clean sysfs entries in error path tpm: Add missing tpm_do_selftest to ST33 I2C driver PKCS#7: Use x509_request_asymmetric_key() Revert "selinux: fix the default socket labeling in sock_graft()" X.509: x509_request_asymmetric_keys() doesn't need string length arguments PKCS#7: fix sparse non static symbol warning KEYS: revert encrypted key change ima: add support for measuring and appraising firmware firmware_class: perform new LSM checks security: introduce kernel_fw_from_file hook PKCS#7: Missing inclusion of linux/err.h ...
2 parents e7fda6c + 478d085 commit bb2cbf5

110 files changed

Lines changed: 4480 additions & 834 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/ABI/testing/ima_policy‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Description:
2626
option: [[appraise_type=]] [permit_directio]
2727

2828
base: func:= [BPRM_CHECK][MMAP_CHECK][FILE_CHECK][MODULE_CHECK]
29+
[FIRMWARE_CHECK]
2930
mask:= [MAY_READ] [MAY_WRITE] [MAY_APPEND] [MAY_EXEC]
3031
fsmagic:= hex value
3132
fsuuid:= file system UUID (e.g 8bcbe394-4f13-4144-be8e-5aa9ea2ce2f6)
@@ -57,7 +58,8 @@ Description:
5758
measure func=BPRM_CHECK
5859
measure func=FILE_MMAP mask=MAY_EXEC
5960
measure func=FILE_CHECK mask=MAY_READ uid=0
60-
measure func=MODULE_CHECK uid=0
61+
measure func=MODULE_CHECK
62+
measure func=FIRMWARE_CHECK
6163
appraise fowner=0
6264

6365
The default policy measures all executables in bprm_check,

‎Documentation/kernel-parameters.txt‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
566566
possible to determine what the correct size should be.
567567
This option provides an override for these situations.
568568

569+
ca_keys= [KEYS] This parameter identifies a specific key(s) on
570+
the system trusted keyring to be used for certificate
571+
trust validation.
572+
format: { id:<keyid> | builtin }
573+
569574
ccw_timeout_log [S390]
570575
See Documentation/s390/CommonIO for details.
571576

@@ -1319,6 +1324,23 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
13191324
Formats: { "ima" | "ima-ng" }
13201325
Default: "ima-ng"
13211326

1327+
ima.ahash_minsize= [IMA] Minimum file size for asynchronous hash usage
1328+
Format: <min_file_size>
1329+
Set the minimal file size for using asynchronous hash.
1330+
If left unspecified, ahash usage is disabled.
1331+
1332+
ahash performance varies for different data sizes on
1333+
different crypto accelerators. This option can be used
1334+
to achieve the best performance for a particular HW.
1335+
1336+
ima.ahash_bufsize= [IMA] Asynchronous hash buffer size
1337+
Format: <bufsize>
1338+
Set hashing buffer size. Default: 4k.
1339+
1340+
ahash performance varies for different chunk sizes on
1341+
different crypto accelerators. This option can be used
1342+
to achieve best performance for particular HW.
1343+
13221344
init= [KNL]
13231345
Format: <full_path>
13241346
Run specified binary instead of /sbin/init as init

‎Documentation/security/keys.txt‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,20 +1150,24 @@ The structure has a number of fields, some of which are mandatory:
11501150
const void *data;
11511151
size_t datalen;
11521152
size_t quotalen;
1153+
time_t expiry;
11531154
};
11541155

11551156
Before calling the method, the caller will fill in data and datalen with
11561157
the payload blob parameters; quotalen will be filled in with the default
1157-
quota size from the key type and the rest will be cleared.
1158+
quota size from the key type; expiry will be set to TIME_T_MAX and the
1159+
rest will be cleared.
11581160

11591161
If a description can be proposed from the payload contents, that should be
11601162
attached as a string to the description field. This will be used for the
11611163
key description if the caller of add_key() passes NULL or "".
11621164

11631165
The method can attach anything it likes to type_data[] and payload. These
1164-
are merely passed along to the instantiate() or update() operations.
1166+
are merely passed along to the instantiate() or update() operations. If
1167+
set, the expiry time will be applied to the key if it is instantiated from
1168+
this data.
11651169

1166-
The method should return 0 if success ful or a negative error code
1170+
The method should return 0 if successful or a negative error code
11671171
otherwise.
11681172

11691173

@@ -1172,7 +1176,9 @@ The structure has a number of fields, some of which are mandatory:
11721176
This method is only required if the preparse() method is provided,
11731177
otherwise it is unused. It cleans up anything attached to the
11741178
description, type_data and payload fields of the key_preparsed_payload
1175-
struct as filled in by the preparse() method.
1179+
struct as filled in by the preparse() method. It will always be called
1180+
after preparse() returns successfully, even if instantiate() or update()
1181+
succeed.
11761182

11771183

11781184
(*) int (*instantiate)(struct key *key, struct key_preparsed_payload *prep);

‎MAINTAINERS‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8002,6 +8002,16 @@ S: Maintained
80028002
F: drivers/mmc/host/sdhci.*
80038003
F: drivers/mmc/host/sdhci-pltfm.[ch]
80048004

8005+
SECURE COMPUTING
8006+
M: Kees Cook <keescook@chromium.org>
8007+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git seccomp
8008+
S: Supported
8009+
F: kernel/seccomp.c
8010+
F: include/uapi/linux/seccomp.h
8011+
F: include/linux/seccomp.h
8012+
K: \bsecure_computing
8013+
K: \bTIF_SECCOMP\b
8014+
80058015
SECURE DIGITAL HOST CONTROLLER INTERFACE, OPEN FIRMWARE BINDINGS (SDHCI-OF)
80068016
M: Anton Vorontsov <anton@enomsg.org>
80078017
L: linuxppc-dev@lists.ozlabs.org

‎arch/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ config HAVE_ARCH_SECCOMP_FILTER
321321
- secure_computing is called from a ptrace_event()-safe context
322322
- secure_computing return value is checked and a return value of -1
323323
results in the system call being skipped immediately.
324+
- seccomp syscall wired up
324325

325326
config SECCOMP_FILTER
326327
def_bool y

‎arch/arm/include/uapi/asm/unistd.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,7 @@
409409
#define __NR_sched_setattr (__NR_SYSCALL_BASE+380)
410410
#define __NR_sched_getattr (__NR_SYSCALL_BASE+381)
411411
#define __NR_renameat2 (__NR_SYSCALL_BASE+382)
412+
#define __NR_seccomp (__NR_SYSCALL_BASE+383)
412413

413414
/*
414415
* The following SWIs are ARM private.

‎arch/arm/kernel/calls.S‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,7 @@
392392
/* 380 */ CALL(sys_sched_setattr)
393393
CALL(sys_sched_getattr)
394394
CALL(sys_renameat2)
395+
CALL(sys_seccomp)
395396
#ifndef syscalls_counted
396397
.equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
397398
#define syscalls_counted

‎arch/mips/include/uapi/asm/unistd.h‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -372,16 +372,17 @@
372372
#define __NR_sched_setattr (__NR_Linux + 349)
373373
#define __NR_sched_getattr (__NR_Linux + 350)
374374
#define __NR_renameat2 (__NR_Linux + 351)
375+
#define __NR_seccomp (__NR_Linux + 352)
375376

376377
/*
377378
* Offset of the last Linux o32 flavoured syscall
378379
*/
379-
#define __NR_Linux_syscalls 351
380+
#define __NR_Linux_syscalls 352
380381

381382
#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
382383

383384
#define __NR_O32_Linux 4000
384-
#define __NR_O32_Linux_syscalls 351
385+
#define __NR_O32_Linux_syscalls 352
385386

386387
#if _MIPS_SIM == _MIPS_SIM_ABI64
387388

@@ -701,16 +702,17 @@
701702
#define __NR_sched_setattr (__NR_Linux + 309)
702703
#define __NR_sched_getattr (__NR_Linux + 310)
703704
#define __NR_renameat2 (__NR_Linux + 311)
705+
#define __NR_seccomp (__NR_Linux + 312)
704706

705707
/*
706708
* Offset of the last Linux 64-bit flavoured syscall
707709
*/
708-
#define __NR_Linux_syscalls 311
710+
#define __NR_Linux_syscalls 312
709711

710712
#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
711713

712714
#define __NR_64_Linux 5000
713-
#define __NR_64_Linux_syscalls 311
715+
#define __NR_64_Linux_syscalls 312
714716

715717
#if _MIPS_SIM == _MIPS_SIM_NABI32
716718

@@ -1034,15 +1036,16 @@
10341036
#define __NR_sched_setattr (__NR_Linux + 313)
10351037
#define __NR_sched_getattr (__NR_Linux + 314)
10361038
#define __NR_renameat2 (__NR_Linux + 315)
1039+
#define __NR_seccomp (__NR_Linux + 316)
10371040

10381041
/*
10391042
* Offset of the last N32 flavoured syscall
10401043
*/
1041-
#define __NR_Linux_syscalls 315
1044+
#define __NR_Linux_syscalls 316
10421045

10431046
#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
10441047

10451048
#define __NR_N32_Linux 6000
1046-
#define __NR_N32_Linux_syscalls 315
1049+
#define __NR_N32_Linux_syscalls 316
10471050

10481051
#endif /* _UAPI_ASM_UNISTD_H */

‎arch/mips/kernel/scall32-o32.S‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,3 +578,4 @@ EXPORT(sys_call_table)
578578
PTR sys_sched_setattr
579579
PTR sys_sched_getattr /* 4350 */
580580
PTR sys_renameat2
581+
PTR sys_seccomp

‎arch/mips/kernel/scall64-64.S‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,4 +431,5 @@ EXPORT(sys_call_table)
431431
PTR sys_sched_setattr
432432
PTR sys_sched_getattr /* 5310 */
433433
PTR sys_renameat2
434+
PTR sys_seccomp
434435
.size sys_call_table,.-sys_call_table

0 commit comments

Comments
 (0)