linux-stable/drivers/char
Zhen Lei 1df83992d9 tpm: fix error return code in tpm2_get_cc_attrs_tbl()
If the total number of commands queried through TPM2_CAP_COMMANDS is
different from that queried through TPM2_CC_GET_CAPABILITY, it indicates
an unknown error. In this case, an appropriate error code -EFAULT should
be returned. However, we currently do not explicitly assign this error
code to 'rc'. As a result, 0 was incorrectly returned.

Cc: stable@vger.kernel.org
Fixes: 58472f5cd4f6("tpm: validate TPM 2.0 commands")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
2021-05-12 22:36:50 +03:00
..
agp parisc: parisc-agp requires SBA IOMMU driver 2021-04-06 11:46:39 +02:00
hw_random Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2021-04-26 08:51:23 -07:00
ipmi A bunch of little cleanups 2021-04-28 15:54:57 -07:00
mwave char/mwave: turn tp3780I_Cleanup() into void function 2021-03-24 08:26:30 +01:00
pcmcia pcmcia: synclink_cs: drop redundant tty-port initialisation 2021-04-07 17:22:07 +02:00
tpm tpm: fix error return code in tpm2_get_cc_attrs_tbl() 2021-05-12 22:36:50 +03:00
xilinx_hwicap
xillybus
adi.c
apm-emulation.c
applicom.c Merge 5.12-rc6 into char-misc-next 2021-04-05 08:43:50 +02:00
applicom.h
bsr.c
ds1620.c
dsp56k.c
dtlk.c
hangcheck-timer.c
hpet.c
Kconfig drivers/char: remove /dev/kmem for good 2021-05-07 00:26:34 -07:00
lp.c char: lp: remove redundant space around (inside) parenthesized expressions 2021-03-24 08:26:32 +01:00
Makefile
mem.c drivers/char: remove /dev/kmem for good 2021-05-07 00:26:34 -07:00
misc.c char: misc: increase DYNAMIC_MINORS value 2020-11-03 09:52:04 +01:00
mspec.c
nsc_gpio.c
nvram.c
nwbutton.c
nwbutton.h
nwflash.c
pc8736x_gpio.c
powernv-op-panel.c
ppdev.c
ps3flash.c powerpc/ps3: make system bus's remove and shutdown callbacks return void 2020-12-04 01:01:22 +11:00
random.c random: remove dead code left over from blocking pool 2021-04-02 18:28:12 +11:00
raw.c raw: don't keep unopened block device around 2020-09-23 10:43:19 -06:00
scx200_gpio.c
sonypi.c
tb0219.c
tlclk.c
toshiba.c module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
ttyprintk.c ttyprintk: Add TTY hangup callback. 2021-04-22 12:01:26 +02:00
uv_mmtimer.c
virtio_console.c virtio_console: remove pointless check for debugfs_create_dir() 2021-03-10 09:21:02 +01:00