Milan Broz
1e5ac6300a
tpm: Fix null pointer dereference on chip register error path
If clk_enable is not defined and chip initialization
is canceled code hits null dereference.
Easily reproducible with vTPM init fail:
swtpm chardev --tpmstate dir=nonexistent_dir --tpm2 --vtpm-proxy
BUG: kernel NULL pointer dereference, address: 00000000
...
Call Trace:
tpm_chip_start+0x9d/0xa0 [tpm]
tpm_chip_register+0x10/0x1a0 [tpm]
vtpm_proxy_work+0x11/0x30 [tpm_vtpm_proxy]
process_one_work+0x214/0x5a0
worker_thread+0x134/0x3e0
? process_one_work+0x5a0/0x5a0
kthread+0xd4/0x100
? process_one_work+0x5a0/0x5a0
? kthread_park+0x90/0x90
ret_from_fork+0x19/0x24
Fixes: 719b7d81f2 ("tpm: introduce tpm_chip_start() and tpm_chip_stop()")
Cc: stable@vger.kernel.org # v5.1+
Signed-off-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
2019-08-05 00:55:00 +03:00
..
2019-07-08 10:39:56 -07:00
2019-07-15 11:03:02 -03:00
2019-07-24 15:53:21 -05:00
2019-05-21 10:50:46 +02:00
2019-05-21 11:28:46 +02:00
2019-08-05 00:55:00 +03:00
2019-05-21 10:50:46 +02:00
2019-06-05 17:37:13 +02:00
2018-06-05 11:24:55 -07:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2017-11-02 11:10:55 +01:00
2019-06-09 09:11:21 +02:00
2019-05-21 10:50:45 +02:00
2018-02-11 14:34:03 -08:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-06-05 17:37:13 +02:00
2019-07-25 14:39:51 +02:00
2019-07-15 11:03:02 -03:00
2019-05-21 10:50:45 +02:00
2019-01-22 10:21:45 +01:00
2019-01-22 14:56:00 +01:00
2019-01-03 18:57:57 -08:00
2019-05-24 18:00:41 +02:00
2019-05-30 11:29:53 -07:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2017-11-21 15:57:05 -08:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:38 -07:00
2019-05-26 00:11:49 -04:00
2019-05-21 10:50:45 +02:00
2019-05-30 11:26:32 -07:00
2019-05-21 10:50:45 +02:00
2017-03-02 08:42:29 +01:00
2018-02-11 14:34:03 -08:00
2019-05-24 17:36:45 +02:00
2019-05-30 11:26:35 -07:00
2018-11-11 12:58:27 -08:00
2019-05-30 11:25:14 -07:00
2019-06-05 17:37:13 +02:00
2019-05-30 11:26:35 -07:00