android_kernel_motorola_sm6375/security/integrity
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Dan Carpenter dd540f2d7c evm: Fix a small race in init_desc()
[ Upstream commit 8433856947217ebb5697a8ff9c4c9cad4639a2cf ]

The IS_ERR_OR_NULL() function has two conditions and if we got really
unlucky we could hit a race where "ptr" started as an error pointer and
then was set to NULL.  Both conditions would be false even though the
pointer at the end was NULL.

This patch fixes the problem by ensuring that "*tfm" can only be NULL
or valid.  I have introduced a "tmp_tfm" variable to make that work.  I
also reversed a condition and pulled the code in one tab.

Reported-by: Roberto Sassu <[email protected]>
Fixes: 53de3b080d5e ("evm: Check also if *tfm is an error pointer in init_desc()")
Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Roberto Sassu <[email protected]>
Acked-by: Krzysztof Struczynski <[email protected]>
Signed-off-by: Mimi Zohar <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2020-05-27 17:46:17 +02:00
..
evm evm: Fix a small race in init_desc() 2020-05-27 17:46:17 +02:00
ima ima: Fix return value of ima_write_policy() 2020-05-27 17:46:08 +02:00
platform_certs efi: Only print errors about failing to get certs if EFI vars are found 2020-03-12 13:00:14 +01:00
digsig.c ima: Implement support for module-style appended signatures 2019-08-05 18:40:23 -04:00
digsig_asymmetric.c Revert "Merge tag 'keys-acl-20190703' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs" 2019-07-10 18:43:43 -07:00
iint.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
integrity.h ima: Implement support for module-style appended signatures 2019-08-05 18:40:23 -04:00
integrity_audit.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
Kconfig integrity: Select CONFIG_KEYS instead of depending on it 2019-08-05 18:40:20 -04:00
Makefile integrity: remove pointless subdir-$(CONFIG_...) 2019-10-05 15:29:49 +09:00